EDN Admin
Well-known member
Hello
i use,
VS2010<br/>
.net 4<br/>
vb.net/asp
i have two pages.
1.aspx and 2.aspx i have a drop down list on the first page and a back and sumbit button on the second page
If i make a selection in the drop down list and go the second page and then go the the first page again with the back button. the drop down list doesnt show the selection that i did.
i tried the use "sessions" but didnt work, also tried postback but no luck. I read something about "Enableviewstate" also no luck.
any help?
code on the first page:
<pre class="prettyprint lang-vb Dim OraCn As New Oracle.DataAccess.Client.OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.55)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxxxxx)));User Id=xxxxx;Password=xxxxxx")
Dim ds As New DataSet()
Dim OraCmd As New Oracle.DataAccess.Client.OracleCommand("select users.id,users.po from users", OracleConnection)
Dim OraDr As Oracle.DataAccess.Client.OracleDataReader
Dim OraDaAdr As New Oracle.DataAccess.Client.OracleDataAdapter(OraCmd =)
Dim DT As New DataTable
OraCn .Open()
OraDr = OraCmd .ExecuteReader
OraDr.Read()
OraDaAdr .Fill(ds)
DropDownList1.DataSource = ds
DropDownList1.DataTextField = ("id")
DropDownList1.DataValueField = ("po")
DropDownList1.DataBind()[/code]
View the full article
i use,
VS2010<br/>
.net 4<br/>
vb.net/asp
i have two pages.
1.aspx and 2.aspx i have a drop down list on the first page and a back and sumbit button on the second page
If i make a selection in the drop down list and go the second page and then go the the first page again with the back button. the drop down list doesnt show the selection that i did.
i tried the use "sessions" but didnt work, also tried postback but no luck. I read something about "Enableviewstate" also no luck.
any help?
code on the first page:
<pre class="prettyprint lang-vb Dim OraCn As New Oracle.DataAccess.Client.OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.55)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxxxxxxx)));User Id=xxxxx;Password=xxxxxx")
Dim ds As New DataSet()
Dim OraCmd As New Oracle.DataAccess.Client.OracleCommand("select users.id,users.po from users", OracleConnection)
Dim OraDr As Oracle.DataAccess.Client.OracleDataReader
Dim OraDaAdr As New Oracle.DataAccess.Client.OracleDataAdapter(OraCmd =)
Dim DT As New DataTable
OraCn .Open()
OraDr = OraCmd .ExecuteReader
OraDr.Read()
OraDaAdr .Fill(ds)
DropDownList1.DataSource = ds
DropDownList1.DataTextField = ("id")
DropDownList1.DataValueField = ("po")
DropDownList1.DataBind()[/code]
View the full article