Button clicks not firing!

Discussion in 'ASP .Net' started by Jay, Jun 16, 2007.

  1. Jay

    Jay Guest

    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 .
    Jay, Jun 16, 2007
    #1
    1. Advertising

  2. 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
    > 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, Jun 17, 2007
    #2
    1. Advertising

  3. Jay

    Jay Guest

    On Jun 16, 8:37 pm, Yuriy Solodkyy <> wrote:
    > 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
    > > 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?
    Jay, Jun 17, 2007
    #3
  4. What happens when you click GO? Are you redirected to the wrong URL?

    > On Jun 16, 8:37 pm, Yuriy Solodkyy <> wrote:
    >
    >> 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
    >>> 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?
    >
    Yuriy Solodkyy, Jun 17, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Smith Jr.

    Problem with missing button clicks

    John Smith Jr., Dec 12, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    373
    John Smith Jr.
    Dec 14, 2003
  2. Paul Hodgson
    Replies:
    3
    Views:
    510
  3. AAaron123
    Replies:
    0
    Views:
    301
    AAaron123
    May 15, 2009
  4. PontiMax

    Clicks and double-clicks

    PontiMax, Jul 14, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    177
    Eliyahu Goldin
    Jul 14, 2004
  5. Mike Griggs

    UserControl not responding to button clicks and other events

    Mike Griggs, Sep 29, 2004, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    164
    Robert Koritnik
    Oct 1, 2004
Loading...

Share This Page