Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way I could prevent an event from executing?

Status
Not open for further replies.

blondebier

Programmer
Jun 19, 2003
142
0
0
GB
I just wandered if there was any way I could stop the Page_load event from executing.

My problem is that I have a table that is generated dynamically. It has 15 labels and 15 corresponding textboxes in this case. A user may input values into the texboxes.

When the Save_Click event is executed, it would loop through the table until it finds a textbox and when it does it will get the value and save it.

Problem: When the Save_Click event is executed the page_load executes and the table disappears!

Any idea how I could get round this?

Many thanks for you comments.
 
You can't prevent it from executing, but you could wrap your code in a test for Not Page.IsPostBack.

Code:
If Not Page.IsPostBack Then
  [i]stuff[/i]
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top