updatepanel og button click caused total refresh of page.

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/26/2009 9:50:21 AM
Gravatar
Total Posts 22
Kenneth Haugland

updatepanel og button click caused total refresh of page.

Hi!

I have cloned the Blog module and have added a UserControl with a text box and a button. There is an autocomplete extender

connected to the textbox. Everythings works fine until i click the button, it does the callback and the whole page is reloaded and the

blog post is removed. Only my usercontrol and the comment field is left. The comment field is marked as invalid captcha.

It seems like something to do with viewstate, but I have really never used asp.net without the viewstate enabled.

Obviously I want to button to do the postback without affecting anyting other than the usercontrol.

Any suggestions?

Kenneth Haugland

 

Usercontrol code:

<asp:UpdatePanel>
<ContentTemplate>
<asp:DropDownList ID="xxCmb" runat="server" Visible="false"></asp:DropDownList>
<asp:TextBox ID="SearchTbx" runat="server" on></asp:TextBox>
<asp:Button ID="AddBtn" runat="server" Text="Add" onclick="AddBtn_Click" />
<br />

<ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="SearchTbx"
ServiceMethod="GetXXSearch" CompletionSetCount="15" CompletionInterval="500"
ServicePath="XXXMethods.asmx"
MinimumPrefixLength="1" ondatabinding="AutoCompleteExtender1_DataBinding" >
</ajaxToolkit:AutoCompleteExtender>
</ContentTemplate>
</asp:UpdatePanel>
 

7/21/2010 5:08:19 PM
Gravatar
Total Posts 156

Re: updatepanel og button click caused total refresh of page.

Yes, I'd like to use UpdatePanel in order to get rid of flashing updates every time an AutoPostBack is fired by any of the form controls, but simply surrounding the outer most fieldset which contains the form with <asp:UpdatePanel></asp:UpdatePanel>  doesn't seem to help

7/22/2010 9:32:31 AM
Gravatar
Total Posts 18439

Re: updatepanel og button click caused total refresh of page.

Hi,

Looks like you are missing UpdateMode="Conditional" runat="server" on your update panel

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.