Button clicks not firing!

J

Jay

I am on the 2.0 framework and have run the c:\windows\microsoft.net
\framework\v1.1.4322\aspnet_regiis.exe -c and had no success. About
half of the buttons on my webforms are firing and the other half are
not, primarily anything on the Master is firing but those in the
content pane are not. This was working fine yesterday!! I've
reviewed all the code changes and can't seem to find a culprit.

Here's one example of what I'm trying to do:

Webform -
<b>Search all People</b>
<asp:TextBox ID="txtSearch" runat="server" />
<asp:Button id="btnGO" Text="GO" runat="server" ToolTip="Click here to
begin search" />



Code Behind -
Protected Sub btnGO_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnGO.Click
If Me.txtSearch.Text <> "" Then
Response.Redirect("search.aspx?searchVal=" &
Me.txtSearch.Text & "&folderID=54&type=people")
End If
End Sub

I've tried this as a custom control as well as adding it directly to
the page. This is occuring on my localhost server as well as a
separate webserver. I tried adding the UseSubmitBehavior="false"
attribute to the button control and the OnClick="btnGO_Click". I
received the following error message :

Invalid postback or callback argument. Event validation is enabled
using <pages enableEventValidation="true"/> in configuration or <%@
Page EnableEventValidation="true" %> in a page. For security
purposes, this feature verifies that arguments to postback or callback
events originate from the server control that originally rendered
them. If the data is valid and expected, use the
ClientScriptManager.RegisterForEventValidation method in order to
register the postback or callback data for validation.


I don't have a javascript onclick for this page so there's nothing to
register
Anyone have any ideas? I could really use them .
 
Y

Yuriy Solodkyy

Hi

c:\windows\microsoft.net\framework\v1.1.4322\aspnet_regiis.exe is from NET
1.1. If you chnaged the runtime to version 1.1 masterpages and other things
stopped working.

-yuriy
 
J

Jay

Hi

c:\windows\microsoft.net\framework\v1.1.4322\aspnet_regiis.exe is from NET
1.1. If you chnaged the runtime to version 1.1 masterpages and other things
stopped working.

-yuriy








- Show quoted text -

I did run the c:\windows\microsoft.net\framework
\v1.1.4322\aspnet_regiis.exe on my local machine and saw no
difference. My local machine is and has been on the 2.0 framework,
although I did have the 1.0 and 1.1 installed on it. The staging
webserver is also on the 2.0 framework and I didn't run the exe on
that one. This problem existed before I ran the exe or I wouldn't have
a problem and thus a need to run it :) My Master page is working
except for the buttons on it are not firing. I did change a few
things in my code and saw some improvements but not the real result.
By this I mean I can get a post back to the page but I lose the value
of my textbox on the postback.

I added the EnableEventValidation="false" to my <%Page
and the UseSubmitBehavior and OnClick to my button control

<asp:TextBox ID="txtAgnSearch" runat="server"/>
<asp:Button ID="Button1" runat="server" Text="Button"
UseSubmitBehavior="false" OnClick="Button1_Click" />

This will give me a postback to the page once and a postback to the
control twice, but in either time I don't have the value I typed into
txtAgnSearch anymore.

I'm still curious why this started happening all of a sudden, anyone
know what can set this off, a registered javascript or something? Any
other thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top