Auto Postback Issue

Discussion in 'ASP .Net' started by yoyo, Aug 26, 2003.

  1. yoyo

    yoyo Guest

    Hi,

    I've added a button control in my webpage, and called a onClick event.

    However it will always go back to the page load, then execute my onClick
    event.

    Is there a way which I can bypass page load??

    Regards
     
    yoyo, Aug 26, 2003
    #1
    1. Advertising

  2. yoyo

    Onur Bozkurt Guest

    If you want to skip some operations that are made in the Page Load, then you
    can construct an if clause as
    If not IsPostBack then
    ..operations you want to make in the load event...
    End If

    "yoyo" <> wrote in message
    news:#...
    > Hi,
    >
    > I've added a button control in my webpage, and called a onClick event.
    >
    > However it will always go back to the page load, then execute my onClick
    > event.
    >
    > Is there a way which I can bypass page load??
    >
    > Regards
    >
    >
    >
    >
     
    Onur Bozkurt, Aug 26, 2003
    #2
    1. Advertising

  3. yoyo

    Ravi Sankar Guest

    You need to understand the event flow and sequence. During
    postback the page load function is called before the
    onClick event.
    If u need to stop some action in the page load, u need to
    use Page.IsPostBack to check if the page is called as the
    first request or post back request and act accordingly.
    Does this answer your question?

    >-----Original Message-----
    >Hi,
    >
    >I've added a button control in my webpage, and called a

    onClick event.
    >
    >However it will always go back to the page load, then

    execute my onClick
    >event.
    >
    >Is there a way which I can bypass page load??
    >
    >Regards
    >
    >
    >
    >
    >.
    >
     
    Ravi Sankar, Aug 26, 2003
    #3
  4. yoyo

    yoyo Guest

    I get what you mean. But there's some actions in the page load that will be
    used by other events.

    And there's no way I can detect that the event comes from this onClick event
    and stop a particular action.

    So now I am researching whether I can go straight to the onClick function
    without going to the page load.


    "Ravi Sankar" <> wrote in message
    news:035e01c36bb7$adf5cc20$...
    > You need to understand the event flow and sequence. During
    > postback the page load function is called before the
    > onClick event.
    > If u need to stop some action in the page load, u need to
    > use Page.IsPostBack to check if the page is called as the
    > first request or post back request and act accordingly.
    > Does this answer your question?
    >
    > >-----Original Message-----
    > >Hi,
    > >
    > >I've added a button control in my webpage, and called a

    > onClick event.
    > >
    > >However it will always go back to the page load, then

    > execute my onClick
    > >event.
    > >
    > >Is there a way which I can bypass page load??
    > >
    > >Regards
    > >
    > >
    > >
    > >
    > >.
    > >
     
    yoyo, Aug 26, 2003
    #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. Thomas Due
    Replies:
    0
    Views:
    568
    Thomas Due
    Apr 20, 2004
  2. Psych971
    Replies:
    5
    Views:
    4,652
    bruce barker
    Dec 17, 2004
  3. nicholas
    Replies:
    4
    Views:
    447
    Karl Seguin
    Mar 14, 2005
  4. =?Utf-8?B?V2FyYW4=?=

    Auto-Suggested Textbox like google auto suggest

    =?Utf-8?B?V2FyYW4=?=, Apr 20, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    8,541
    inrakeshworld
    Jul 27, 2007
  5. linkswanted
    Replies:
    1
    Views:
    949
Loading...

Share This Page