__EVENTTARGET correct but events don't fire and IsPostback == false?

Discussion in 'ASP .Net' started by Kenneth Baltrinic, May 31, 2007.

  1. I am having a very odd problem. On a page that was working until very
    recently we are now encountering the following situation:

    The page is a very basic fill in the blank form used for changing ones
    password in a forms based authentication scenario. After the user fills out
    the form and clicks the Change Password button, the page simply reloads as
    if nothing happened. We turned on page tracing and also added the following
    lines to the PageLoad event:

    Trace.Write( Request.Form["__EVENTTARGET"] );
    Trace.Write( cmdChangePassword.UniqueID );
    Trace.Write( Page.IsPostback );

    From which we get:
    ctl00$cphMain$cmdChangePassword
    ctl00$cphMain$cmdChangePassword
    false

    The first two values tell me that IsPostback should be true and that the
    cmdChangePassword click event should fire. But IsPostback is false and the
    cmdChangePassword_OnClick event handler is never called.

    As I said this was working and now suddenly stopped. Any ideas?

    --Ken
    Kenneth Baltrinic, May 31, 2007
    #1
    1. Advertising

  2. Kenneth Baltrinic

    bruce barker Guest

    Re: __EVENTTARGET correct but events don't fire and IsPostback ==false?

    if ispostback is false no events will fire. it based on __viewstate
    being in the form data.

    -- bruce (sqlwork.com)

    Kenneth Baltrinic wrote:
    > I am having a very odd problem. On a page that was working until very
    > recently we are now encountering the following situation:
    >
    > The page is a very basic fill in the blank form used for changing ones
    > password in a forms based authentication scenario. After the user fills out
    > the form and clicks the Change Password button, the page simply reloads as
    > if nothing happened. We turned on page tracing and also added the following
    > lines to the PageLoad event:
    >
    > Trace.Write( Request.Form["__EVENTTARGET"] );
    > Trace.Write( cmdChangePassword.UniqueID );
    > Trace.Write( Page.IsPostback );
    >
    > From which we get:
    > ctl00$cphMain$cmdChangePassword
    > ctl00$cphMain$cmdChangePassword
    > false
    >
    > The first two values tell me that IsPostback should be true and that the
    > cmdChangePassword click event should fire. But IsPostback is false and the
    > cmdChangePassword_OnClick event handler is never called.
    >
    > As I said this was working and now suddenly stopped. Any ideas?
    >
    > --Ken
    >
    >
    bruce barker, May 31, 2007
    #2
    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. Joey
    Replies:
    2
    Views:
    3,914
  2. Kenneth Baltrinic
    Replies:
    1
    Views:
    732
    bruce barker
    Jun 4, 2007
  3. PSY
    Replies:
    3
    Views:
    13,151
  4. Serg

    __doPostBack and NULL __EVENTTARGET?

    Serg, Mar 3, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    380
  5. PSY
    Replies:
    1
    Views:
    168
Loading...

Share This Page