From: TS on 15 Apr 2010 10:04 thanks zhi-qiang, but I am still having problems...the postbackURL is blank all the way thru page execution life cycle. It is never set and it is always blank. What else could cause this? thanks "TS" <manofsteele1(a)nospam.nospam> wrote in message news:u2ioBK9vKHA.3536(a)TK2MSFTNGP06.phx.gbl... > hello, I don't see that you replied to my previous post sent on 02/22: > > postbackUrl is empty string - checked at time of rendering the control. > > I had already looked into this as a possible reason but its not the case. > > thanks > > "Zhi-Qiang Ni[MSFT]" <v-zhiqni(a)online.microsoft.com> wrote in message > news:R4mIzmTqKHA.2332(a)TK2MSFTNGHUB02.phx.gbl... >> Hi TS, >> >> Sorry for my delay. From your description, I know that you would like to >> stop the post back of the imageButton, but although you added 'return >> false' in the onclientclick event handler, a >> 'WebForm_DoPostBackWithOptions >> function' is also added into the rendered control and the imageButton >> still >> make post back. If I misunderstood you, please tell me. >> >> The cause of the 'extra' code -- WebForm_DoPostBackWithOptions-is the >> imageButton has been added a property 'PostBackURL'. If we set this >> property of some button, when we click this button, the page would be >> post >> back to the URL which you set as the value. Such function >> 'WebForm_DoPostBackWithOptions' is to DoPostBack with the options: the >> button's ID and the URL value. >> >> Please remove the setting of the PostBackUrl property to avoid the >> 'extra' >> code. >> >> You said that you added 'return false' inside the client function. >> However, >> in the rendered control, the WebForm_DoPostBackWithOptions function can >> still be fired. To avoid this, we can add the 'return false' after the >> client function like this: >> <asp:ImageButton ID="ImageButton1" runat="server" >> Imageurl="~/click.gif" OnClientClick="clientClick();return false;" >> PostBackUrl="~/Default.aspx" /> >> >> The related document: >> http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.pos >> tbackurl.aspx >> >> >> -- >> Sincerely, >> >> Zhi-Qiang Ni >> >> Microsoft Online Support >> >> >> ================================================== >> Get notification to my posts through email? Please refer to >> http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications. >> >> MSDN Managed Newsgroup support offering is for non-urgent issues where an >> initial response from the community or a Microsoft Support Engineer >> within >> 2 business day is acceptable. Please note that each follow up response >> may >> take approximately 2 business days as the support professional working >> with >> you may need further investigation to reach the most efficient >> resolution. >> The offering is not appropriate for situations that require urgent, >> real-time or phone-based interactions. Issues of this nature are best >> handled working with a dedicated Microsoft Support Engineer by contacting >> Microsoft Customer Support Services (CSS) at >> http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx >> ================================================== >> >>
From: TS on 15 Apr 2010 10:07 from the URL you sent me, it says the following which indicates that even if you don't enter PostBackUrl it will use current page: "Set the PostBackUrl property to the URL of the Web page to post to when the Button control is clicked. For example, specifying Page2.aspx causes the page that contains the Button control to post to Page2.aspx. If you do not specify a value for the PostBackUrl property, the page posts back to itself." so it is using the current page whether specified or not. please help "TS" <manofsteele1(a)nospam.nospam> wrote in message news:u2ioBK9vKHA.3536(a)TK2MSFTNGP06.phx.gbl... > hello, I don't see that you replied to my previous post sent on 02/22: > > postbackUrl is empty string - checked at time of rendering the control. > > I had already looked into this as a possible reason but its not the case. > > thanks > > "Zhi-Qiang Ni[MSFT]" <v-zhiqni(a)online.microsoft.com> wrote in message > news:R4mIzmTqKHA.2332(a)TK2MSFTNGHUB02.phx.gbl... >> Hi TS, >> >> Sorry for my delay. From your description, I know that you would like to >> stop the post back of the imageButton, but although you added 'return >> false' in the onclientclick event handler, a >> 'WebForm_DoPostBackWithOptions >> function' is also added into the rendered control and the imageButton >> still >> make post back. If I misunderstood you, please tell me. >> >> The cause of the 'extra' code -- WebForm_DoPostBackWithOptions-is the >> imageButton has been added a property 'PostBackURL'. If we set this >> property of some button, when we click this button, the page would be >> post >> back to the URL which you set as the value. Such function >> 'WebForm_DoPostBackWithOptions' is to DoPostBack with the options: the >> button's ID and the URL value. >> >> Please remove the setting of the PostBackUrl property to avoid the >> 'extra' >> code. >> >> You said that you added 'return false' inside the client function. >> However, >> in the rendered control, the WebForm_DoPostBackWithOptions function can >> still be fired. To avoid this, we can add the 'return false' after the >> client function like this: >> <asp:ImageButton ID="ImageButton1" runat="server" >> Imageurl="~/click.gif" OnClientClick="clientClick();return false;" >> PostBackUrl="~/Default.aspx" /> >> >> The related document: >> http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.pos >> tbackurl.aspx >> >> >> -- >> Sincerely, >> >> Zhi-Qiang Ni >> >> Microsoft Online Support >> >> >> ================================================== >> Get notification to my posts through email? Please refer to >> http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications. >> >> MSDN Managed Newsgroup support offering is for non-urgent issues where an >> initial response from the community or a Microsoft Support Engineer >> within >> 2 business day is acceptable. Please note that each follow up response >> may >> take approximately 2 business days as the support professional working >> with >> you may need further investigation to reach the most efficient >> resolution. >> The offering is not appropriate for situations that require urgent, >> real-time or phone-based interactions. Issues of this nature are best >> handled working with a dedicated Microsoft Support Engineer by contacting >> Microsoft Customer Support Services (CSS) at >> http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx >> ================================================== >> >>
|
Pages: 1 Prev: Master/content pages: prob with passing a control to JS Next: RIA Services 4 |