Reputation: 4066
I have this page that queries a Lucene index and displays results. The querying and displaying of results happens on the page load. The button only redirects to a new page with appropriate queries. But for some reason this buttonclick event has stopped firing. I haven't changed anything obvious in the properties or the code behind functions. I tried to change it to a regular Button to get it to work but that isn't working either.
When I click the button it does seem to be doing a post back but when I put a break point on it the debugger never hits the function for the click event.
Here is the code that is not firing:
<asp:Button ID="btnSubmit" runat="server" CssClass="button red submit" OnClick="btnSubmit_Click"></asp:Button>
The code behind:
protected void btnSubmit_Click(object sender, EventArgs e)
{
Response.Redirect("/search.aspx?query=" + query);
}
Upvotes: 0
Views: 289
Reputation: 2493
Not enough information to solve the problem, but try to remove CssClass, try to create new empty page and put button with same code. Do not waste your time.
Upvotes: 1