after click refresh

Discussion in 'ASP .Net' started by Alexander Widera, Oct 18, 2005.

  1. hi,

    i have a button... after a click on it a function is called ... in it it is
    done something and it is needed to reload the page now... how can i reload a
    page? with Response.Redirect ? or is there a better solution? what are the
    parameters, that exactly the called url is refrehed (including the
    querystring)

    thanks
    alex
     
    Alexander Widera, Oct 18, 2005
    #1
    1. Advertising

  2. Alexander Widera

    Niraj Ranka Guest

    Hello,

    Actually Response.Redirect will be better option to reload the page itself.
    As u can maintaing all the parameters of the url here.

    Regards,
    Niraj Ranka
    "Alexander Widera"
    <-chemnitz.de-novaliddomainpleasedeletethispart.de> wrote in
    message news:%...
    > hi,
    >
    > i have a button... after a click on it a function is called ... in it it
    > is done something and it is needed to reload the page now... how can i
    > reload a page? with Response.Redirect ? or is there a better solution?
    > what are the parameters, that exactly the called url is refrehed
    > (including the querystring)
    >
    > thanks
    > alex
    >
     
    Niraj Ranka, Oct 18, 2005
    #2
    1. Advertising

  3. Alexander Widera

    Hans Kesting Guest

    Alexander Widera wrote:
    > hi,
    >
    > i have a button... after a click on it a function is called ... in it
    > it is done something and it is needed to reload the page now... how
    > can i reload a page? with Response.Redirect ? or is there a better
    > solution? what are the parameters, that exactly the called url is
    > refrehed (including the querystring)
    >
    > thanks
    > alex


    If you change values in the onClick event or in PreRender then you don't
    have to do anything. The page will re-show itself if you don't redirect away
    from it.
    One warning: if the user then "refreshes" the page, he will
    a) receive a client-side warning about resubmitting values
    b) execute the onClick again.

    Hans Kesting
     
    Hans Kesting, Oct 18, 2005
    #3
  4. I have the following problem:

    - the onclick is fired (and the page reloads) ...
    - the default(-template-)page begins to load ....
    - it loads an unsercontrol ...
    - in it is the function for handling the onclick-event
    - the function manipulates an value of an object of a self-created-class
    - the new value should be displayed on the current page ... BUT ...the
    output of the value is in an other usercontrol, and this control is loaded
    before the control of the click-handling usercontrol...
    - and so the value stays the old ... only after an refresh (without
    resending) the value is the correct (new) one

    and that is the problem i think ...
    but if i change the order of the usercontrols the same effect occurs... i
    dont know why ...
    if i place a Response.Redirect(Request.Url.ToString()) then it works ...
    but
    .... it's not the fine way ...

    Does somebody knows more about my problem?

    Thanks





    "Hans Kesting" <> schrieb im Newsbeitrag
    news:...
    > Alexander Widera wrote:
    >> hi,
    >>
    >> i have a button... after a click on it a function is called ... in it
    >> it is done something and it is needed to reload the page now... how
    >> can i reload a page? with Response.Redirect ? or is there a better
    >> solution? what are the parameters, that exactly the called url is
    >> refrehed (including the querystring)
    >>
    >> thanks
    >> alex

    >
    > If you change values in the onClick event or in PreRender then you don't
    > have to do anything. The page will re-show itself if you don't redirect
    > away
    > from it.
    > One warning: if the user then "refreshes" the page, he will
    > a) receive a client-side warning about resubmitting values
    > b) execute the onClick again.
    >
    > Hans Kesting
    >
    >
     
    Alexander Widera, Oct 18, 2005
    #4
  5. and one more problem:

    the onclick event comes from a rewritten-url ... e.g.
    /en/mypage/default.aspx ... but if i use
    Response.Redirect(Request.Url.ToString()) then the Url is e.g.
    /default.aspx?lang=en&page=mypage

    How can I get the Url which is displayed in the browser-location-bar?

    Thanks for help


    "Hans Kesting" <> schrieb im Newsbeitrag
    news:...
    > Alexander Widera wrote:
    >> hi,
    >>
    >> i have a button... after a click on it a function is called ... in it
    >> it is done something and it is needed to reload the page now... how
    >> can i reload a page? with Response.Redirect ? or is there a better
    >> solution? what are the parameters, that exactly the called url is
    >> refrehed (including the querystring)
    >>
    >> thanks
    >> alex

    >
    > If you change values in the onClick event or in PreRender then you don't
    > have to do anything. The page will re-show itself if you don't redirect
    > away
    > from it.
    > One warning: if the user then "refreshes" the page, he will
    > a) receive a client-side warning about resubmitting values
    > b) execute the onClick again.
    >
    > Hans Kesting
    >
    >
     
    Alexander Widera, Oct 18, 2005
    #5
    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. brian lanning
    Replies:
    0
    Views:
    629
    brian lanning
    Jul 29, 2003
  2. Dirk Meusel
    Replies:
    1
    Views:
    3,072
    Dirk Meusel
    Aug 19, 2003
  3. Per Magnus L?vold
    Replies:
    1
    Views:
    5,210
    John C. Bollinger
    Oct 8, 2004
  4. Max2006
    Replies:
    2
    Views:
    1,637
    Walter Wang [MSFT]
    Sep 19, 2007
  5. chandrajit_in
    Replies:
    0
    Views:
    1,762
    chandrajit_in
    Jan 3, 2008
Loading...

Share This Page