Hi,
I have a C# web form with a search button and some search criteria. But after adding an AJAX panel, the search button won't post back.
Any idea?
Thanks in advance!
Hi,
I have a C# web form with a search button and some search criteria. But after adding an AJAX panel, the search button won't post back.
Any idea?
Thanks in advance!
Really, it would help a lot if you could post your code. There's no way to diagnose anything otherwise.
My first guess is that there is a javascript error somewhere on the page.
Do you have UseSubmitBehavior="true" on the button? Also, check the UpdateMode attribute on the UpdatePanel.
Is there any Javascript error happening on the page like Sys is undefined etc?
Also check for nested form tags. We had a user control with a standard html form
<form action = "someotherpage.asp">
, and when this user control was nested inside the <form runat="Server">
tags, we would get this behavior.
Is the search button within the UpdatePanel? If so, you need to add a PostBackTrigger in teh triggers for the search button. This goes in the Triggers section of the UpdatePanel control.
if you realy want to postback, plz use this .... put this in page load event
ScriptManager.GetCurrent(this).RegisterPostBackControl(yourbuttonID);