Saturday, March 31, 2012

Single Page_Load Event

I would like to populate my drop down lists with data only once. I put the code in the Page_Load event. It looks like the Page_Load event is being kicked off every time I change index in one of my drop down lists. Is there another event I should be using?if(!IsPostBack) BindDDL();
Hello..

I'm having a simular problem.. I have code that I only want to run ONCE..

I have this code

Protected Sub Page_Load(...) Handles Me.Load

If (Not IsPostBack) Then

Me.txtTest.Visible = True
Me.txtTest.Text = "test"

End If

End Sub


When I load the page it doesn't do anything.. Whe I press a button it fills my txt with "test", and after that it works fine..

It will run ONCE, but after a click.. But I want it to run on the load of the page..

Why doesn't it work?

thanks in advance!

nickname

0 comments:

Post a Comment