473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Button clicks not firing!

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 .

Jun 16 '07 #1
3 5477
Hi

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

-yuriy
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 .

Jun 17 '07 #2
Jay
On Jun 16, 8:37 pm, Yuriy Solodkyy <y.dot.solod...@gmail.comwrote:
Hi

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

-yuriy
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 .- Hide quoted text -

- 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?

Jun 17 '07 #3
What happens when you click GO? Are you redirected to the wrong URL?
On Jun 16, 8:37 pm, Yuriy Solodkyy <y.dot.solod...@gmail.comwrote:
>Hi

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

-yuriy
>>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 .- Hide quoted text
-
- 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?

Jun 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ben Fidge | last post by:
I've got a problem where some buttons placed on a user control are only firing their OnClick events when the user clicks on them for the second time. I've got the situation where some common...
1
by: Klaus Jensen | last post by:
Hi! This has been annoying me all day, and I can't get it to work It is really driving me nuts! Basicly this simple webapp created to illustrate my problem, renders five buttons, and adds a...
1
by: John Hughes | last post by:
Im adding a button at runtime to a datagrid but the DataGrid1.ItemCommand event does not fire. I also have a button that I added at design time and this button does fire the event ItemCommand. ...
3
by: Rosanne | last post by:
Is there a way to clear the SelectedIndex of a listbox when the browser's back button is clicked? I have a page that contains a server side list box with AutoPostBack = True. When the user...
0
by: Brian Mitchell | last post by:
Hello, I have a toolbar which I am populating the buttons at runtime. All of my buttons have drop down menus associated with them as well as a click event on the button itself. If a user clicks...
24
by: John Gabriel | last post by:
CreateDialogIndirect() fires my Radio button click function without the radio button having being clicked. I am using VC++ 2003.NET. I believe this is yet another Microsoft bug. Have checked dialog...
3
by: GauravGupta | last post by:
i want to know that is it posible to call button click event before page load event on post back.... please help me....
5
by: developApps | last post by:
This problem only occurs in Firefox.... I have a page (page 1) with a link button. The link button uses response.redirect to pass parameters and take me to a second page (page 2) when the...
5
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.