473,734 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button clicks not firing!

Jay
I am on the 2.0 framework and have run the c:\windows\micr osoft.net
\framework\v1.1 .4322\aspnet_re giis.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(ByV al sender As Object, ByVal e As
System.EventArg s) Handles btnGO.Click
If Me.txtSearch.Te xt <"" Then
Response.Redire ct("search.aspx ?searchVal=" &
Me.txtSearch.Te xt & "&folderID=54&t ype=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 UseSubmitBehavi or="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 enableEventVali dation="true"/in configuration or <%@
Page EnableEventVali dation="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
ClientScriptMan ager.RegisterFo rEventValidatio n 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 5516
Hi

c:\windows\micr osoft.net\frame work\v1.1.4322\ aspnet_regiis.e xe 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\micr osoft.net
\framework\v1.1 .4322\aspnet_re giis.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(ByV al sender As Object, ByVal e As
System.EventArg s) Handles btnGO.Click
If Me.txtSearch.Te xt <"" Then
Response.Redire ct("search.aspx ?searchVal=" &
Me.txtSearch.Te xt & "&folderID=54&t ype=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 UseSubmitBehavi or="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 enableEventVali dation="true"/in configuration or <%@
Page EnableEventVali dation="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
ClientScriptMan ager.RegisterFo rEventValidatio n 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\micr osoft.net\frame work\v1.1.4322\ aspnet_regiis.e xe 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\micr osoft.net
\framework\v1.1 .4322\aspnet_re giis.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(ByV al sender As Object, ByVal e As
System.EventArg s) Handles btnGO.Click
If Me.txtSearch.Te xt <"" Then
Response.Redire ct("search.aspx ?searchVal=" &
Me.txtSearch.Te xt & "&folderID=54&t ype=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 UseSubmitBehavi or="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 enableEventVali dation="true"/in configuration or <%@
Page EnableEventVali dation="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
ClientScriptMan ager.RegisterFo rEventValidatio n 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\micr osoft.net\frame work
\v1.1.4322\aspn et_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 EnableEventVali dation="false" to my <%Page
and the UseSubmitBehavi or and OnClick to my button control

<asp:TextBox ID="txtAgnSearc h" runat="server"/>
<asp:Button ID="Button1" runat="server" Text="Button"
UseSubmitBehavi or="false" OnClick="Button 1_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\mic rosoft.net\fram ework\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
>>I am on the 2.0 framework and have run the c:\windows\micr osoft.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:TextBo x ID="txtSearch" runat="server" />
<asp:Button id="btnGO" Text="GO" runat="server" ToolTip="Click here
to
begin search" />
Code Behind -
Protected Sub btnGO_Click(ByV al sender As Object, ByVal e As
System.EventA rgs) Handles btnGO.Click
If Me.txtSearch.Te xt <"" Then
Response.Redi rect("search.as px?searchVal=" &
Me.txtSearch. Text & "&folderID=54&t ype=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 UseSubmitBehavi or="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 enableEventVali dation="true"/in configuration or <%@
Page EnableEventVali dation="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
ClientScriptM anager.Register ForEventValidat ion 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\micr osoft.net\frame work
\v1.1.4322\aspn et_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 EnableEventVali dation="false" to my <%Page and the
UseSubmitBehavi or and OnClick to my button control

<asp:TextBox ID="txtAgnSearc h" runat="server"/<asp:Button
ID="Button1" runat="server" Text="Button" UseSubmitBehavi or="false"
OnClick="Button 1_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
11799
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 functionality (Insert/Edit/Save/Cancel) is wrapped up in a user control. This control is embedded on several other user controls. I don't know if this is relevant or not but the latter
1
1799
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 handler to the click event. When a button is clicked, the background-color is set to blue. Try running the page, and clicking the "Do stuff and update controls
1
1765
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. Any ideas? My Code : private void InitializeComponent()
3
3216
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 clicks an item in the listbox, they are redirected to an information page based on their selection. On this information page, if the user clicks the browser's back button they are taken back to the first page with the item in the listbox still...
0
928
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 just the button the appropriate event is fired and everything work fine. -However- If a user clicks on one of the menu items from the dropdown of the button,
24
4560
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 resources and memory - both appear to be in order. Can anyone comment on this? Should CreateDialogIndirect() which is located in dlgcore.cpp ever fire a button click routine??
3
21148
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
4573
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 lnkButton_click event is fired. Most of the time, the functionality works. However, if a user clicks any other button on the page and then comes back to page 1 using the browser's back button, the link button redirects to that last page. Meaning, the...
5
5893
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 the screen. I have been unable to find any way to disable this button in Access 2007 and subsequently I have been forced to find ways to detect and handle the situations after the Access Close button has been clicked. I have been largely...
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8776
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9236
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.