VS.NET - debug vs. view in browser question

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top