Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to excute some code only for the first asp:button click
- protected void Button1_Click(object sender, EventArgs e)
- {
- if (Session["Clicked"] == null)
- Session["Clicked"] = true;
- else {
- // We already ran this function once, so do other stuff from now on
- ...
- return;
- }
- // Code below this comment will be executed only on the 1st button click
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement