Hi, I have a drop down list with multiple choices. When I made a selection and went to the next page that selection won't show the wording, only show the number correlates to the choice I made (e.g. I chose option no 1 (Animal), the drop down list on the next page will only show 1 instead of Animal). I'm using a three-tier design in VS 2005 with mysql.
1st Page coding:
Dim Department = dd_Department.SelectedValue
dd_Department.SelectedValue = Session("Department") -> mysql database
Dim pop_nat As Data.DataSet = business.populate_Department()
dd_Department.DataSource = pop_nat
dd_Department.DataValueField = "DeptID"
dd_Department.DataTextField = "DeptName"
dd_Department.DataBind()
2nd page coding:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ds As Data.DataSet
dd_Department.Text = ds.Tables(0).Rows(0)("DeptID")
Dim pop_nat As Data.DataSet = business.populate_Department()
dd_Department.DataSource = pop_nat
dd_Department.DataValueField = "DeptID"
dd_Department.DataTextField = "DeptName"
dd_Department.DataBind()
End Sub
should I use the toString() command or what?
Please help, thanks.
1st Page coding:
Dim Department = dd_Department.SelectedValue
dd_Department.SelectedValue = Session("Department") -> mysql database
Dim pop_nat As Data.DataSet = business.populate_Department()
dd_Department.DataSource = pop_nat
dd_Department.DataValueField = "DeptID"
dd_Department.DataTextField = "DeptName"
dd_Department.DataBind()
2nd page coding:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ds As Data.DataSet
dd_Department.Text = ds.Tables(0).Rows(0)("DeptID")
Dim pop_nat As Data.DataSet = business.populate_Department()
dd_Department.DataSource = pop_nat
dd_Department.DataValueField = "DeptID"
dd_Department.DataTextField = "DeptName"
dd_Department.DataBind()
End Sub
should I use the toString() command or what?
Please help, thanks.