PostBack Problem
-
hi. i m having problem with post back. i m having my .vb file in which i got my edit button even sub and save btn event sub. i m declaring ( dim flag as integer =-1 )on page load event. on clicking on edit button flag becomes 1 and in save btn event i got my condition if flag=1 then end if when i hit edit flag becomes 1 and on clicking on save button, the button's postbck event is called and due to post back the flag is initialised to -1. i know what is postback and how it works .but m not aware how to handle it.. can anyone help how to come out of this situation??
-
hi. i m having problem with post back. i m having my .vb file in which i got my edit button even sub and save btn event sub. i m declaring ( dim flag as integer =-1 )on page load event. on clicking on edit button flag becomes 1 and in save btn event i got my condition if flag=1 then end if when i hit edit flag becomes 1 and on clicking on save button, the button's postbck event is called and due to post back the flag is initialised to -1. i know what is postback and how it works .but m not aware how to handle it.. can anyone help how to come out of this situation??
-
hi. i m having problem with post back. i m having my .vb file in which i got my edit button even sub and save btn event sub. i m declaring ( dim flag as integer =-1 )on page load event. on clicking on edit button flag becomes 1 and in save btn event i got my condition if flag=1 then end if when i hit edit flag becomes 1 and on clicking on save button, the button's postbck event is called and due to post back the flag is initialised to -1. i know what is postback and how it works .but m not aware how to handle it.. can anyone help how to come out of this situation??
Your page_load event will get called each time there is a postback. So when you click your save button it's setting your flag back to -1. you should look at:
page.isPostBack