Multiple Postback on my Page
-
Hi All Could you give me a solution for multiple postback problem. In this case, if you click a button, it seems that it is executed 2 times. Honestly, I dont know "a thing" that cause it. I just use 1 masterpage, 1 control and one page. Appreciating for your comment much. Regards Azmi Simple thiing should be simple, complex thing should be possible.
-
Hi All Could you give me a solution for multiple postback problem. In this case, if you click a button, it seems that it is executed 2 times. Honestly, I dont know "a thing" that cause it. I just use 1 masterpage, 1 control and one page. Appreciating for your comment much. Regards Azmi Simple thiing should be simple, complex thing should be possible.
Yes it was happening with me also in my case the reason was In aspx if you see Page directive there is AutoEventWireup property which is true by default and we also had written Page_init and Page Load event decalration in it. that was in 2003 in declrations sections . IN fact in 2005 there is no need to wtite it in code behind file as it is present in designer page
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Yes it was happening with me also in my case the reason was In aspx if you see Page directive there is AutoEventWireup property which is true by default and we also had written Page_init and Page Load event decalration in it. that was in 2003 in declrations sections . IN fact in 2005 there is no need to wtite it in code behind file as it is present in designer page
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
Hi Sandeep Thanks for your reply. So, what should I do? Is it delete the AutoEventWireup property or just set it into false? Btw, in my code AutoEventWireup property is set into false (in html markup sections). But, it is still create twice postback. I test it with Response.write("alert('test')"). In result, alert test is comes up twice, which means there are 2 postback. Regards, Azmi rizaazmi [at] yahoo [dot] co [dot] id ----------------------------------------------------------- Simple thing should be simple, complex thing should be opssible.
-
Hi All Could you give me a solution for multiple postback problem. In this case, if you click a button, it seems that it is executed 2 times. Honestly, I dont know "a thing" that cause it. I just use 1 masterpage, 1 control and one page. Appreciating for your comment much. Regards Azmi Simple thiing should be simple, complex thing should be possible.
Remove the "Handles button1.Click" from the button_click event. God is always with you.
-
Hi Sandeep Thanks for your reply. So, what should I do? Is it delete the AutoEventWireup property or just set it into false? Btw, in my code AutoEventWireup property is set into false (in html markup sections). But, it is still create twice postback. I test it with Response.write("alert('test')"). In result, alert test is comes up twice, which means there are 2 postback. Regards, Azmi rizaazmi [at] yahoo [dot] co [dot] id ----------------------------------------------------------- Simple thing should be simple, complex thing should be opssible.
I can't say anything just try to check events how they are firing
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Remove the "Handles button1.Click" from the button_click event. God is always with you.
Hi Saranya Devi, Hi All Thanks for the solution. By your answer, I just find the problem. The reason is there is a 2 event click: 1. in the HTML page (markup section) there is OnClick = "Button1_Click" 2. in the aspx.vb (code section) there is Handles Button1.Click So, choose one wheter delete Handles Button1.Click or remove OnClick="Button1_Click" I guess this is cause when I move 2003 to 2005. Case is closed. Thanks all for sharing the solution.
-
Remove the "Handles button1.Click" from the button_click event. God is always with you.
yes he is right.there is an another alternative for tht. remove onClick="button_click" from the button's html in .aspx page. Regards. Atif Ali Bhatti. Software Engineer. eSoul Consultancy Pvt. Ltd.
-
yes he is right.there is an another alternative for tht. remove onClick="button_click" from the button's html in .aspx page. Regards. Atif Ali Bhatti. Software Engineer. eSoul Consultancy Pvt. Ltd.
-
yes he is right.there is an another alternative for tht. remove onClick="button_click" from the button's html in .aspx page. Regards. Atif Ali Bhatti. Software Engineer. eSoul Consultancy Pvt. Ltd.
WaAlakum Assalam, every buddy here is most welcome n requested to feel free to ask n e question regarding web development is there is ne. I always would be there if i know. Regards. Atif Ali Bhatti. Software Engineer. eSoul Consultancy Pvt. Ltd.