SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    May 2006
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    refreshing a page

    Code:
        protected void UKCommercial_Click(object sender, ImageClickEventArgs e)
        {
             // set some variables first
             // refresh page
    
        }
    how would I go about refreshing the page?
    I dont want to add
    Code:
    onclick="location.reload(true)"
    into the button code becasue I want to be able to set some varibales before doing so?

    What would be the best way of refreshing the page?

  2. #2
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't get what the issue is, could you please describe it better? Why not just submit the form?

  3. #3
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    as above, as your using ASP.Net, when the element is clicked the browser has to perform a postback, which is basically submitting a form.

    So technically you've answered your own question, unless you want to refresh the page twice?



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •