S
Scott
I ran into a recent issue with a simple databinding code in VS.NET
2003, putting an ArrayList in an Application variable and binding it in
a web form.
Global.asax, Application_Start event:
Dim StateList As New ArrayList
StateList.Add("AK")
StateList.Add("AL")
Application("States") = StateList
Web form Page_Load event:
If Not Page.IsPostBack Then
ddlStates.DataSource = CType(Application("States"),
ArrayList)
ddlStates.DataBind()
End If
It worked for me with me, but not for co-workers. (I was running a .NET
tutorial.) I figured out that when I do my normal method to view the
page, which is build the project and then View in browser, the
DropDownList - ddlStates - appeared as it should, with a list of
states. But, when the others tried it, nothing happened - the DDL was
empty. It turns out they were building the solution and then going into
debug mode. When I performed a View in browser on their machine, their
code worked too. Any ideas why?
Thank you,
Scott
2003, putting an ArrayList in an Application variable and binding it in
a web form.
Global.asax, Application_Start event:
Dim StateList As New ArrayList
StateList.Add("AK")
StateList.Add("AL")
Application("States") = StateList
Web form Page_Load event:
If Not Page.IsPostBack Then
ddlStates.DataSource = CType(Application("States"),
ArrayList)
ddlStates.DataBind()
End If
It worked for me with me, but not for co-workers. (I was running a .NET
tutorial.) I figured out that when I do my normal method to view the
page, which is build the project and then View in browser, the
DropDownList - ddlStates - appeared as it should, with a list of
states. But, when the others tried it, nothing happened - the DDL was
empty. It turns out they were building the solution and then going into
debug mode. When I performed a View in browser on their machine, their
code worked too. Any ideas why?
Thank you,
Scott