Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

Button clicks not firing!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jay - 16 Jun 2007 22:24 GMT
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 .
Yuriy Solodkyy - 17 Jun 2007 01:37 GMT
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

> 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
[quoted text clipped - 36 lines]
> register
> Anyone have any ideas?  I could really use them
Jay - 17 Jun 2007 22:31 GMT
> Hi
>
[quoted text clipped - 46 lines]
>
> - 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?
Yuriy Solodkyy - 17 Jun 2007 22:43 GMT
What happens when you click GO?  Are you redirected to the wrong URL?

>> Hi
>>
[quoted text clipped - 74 lines]
> know what can set this off, a registered javascript or something? Any
> other thoughts?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.