473,405 Members | 2,154 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,405 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 5478
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.