www.webdeveloper.com
Results 1 to 5 of 5

Thread: How to force an AutoPostBack when I click a ASP:Button?

  1. #1
    Join Date
    Feb 2004
    Posts
    19

    How to force an AutoPostBack when I click a ASP:Button?

    I want to to a AutoPostBack but unfortunelly ASP:Button doesn't has it so I wanna know if there's a way to do an AutoPostBack from ServerSide?

  2. #2
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    The Response object contains a server-side redirection method. I have demonstrated below.
    Code:
    '| Refresh the page by grabbing the currect documents URL in the ServerVariables collection.
    Response.Redirect(Request.ServerVariables("SCRIPT_NAME"))
    Regards,
    Andrew Buntine.

  3. #3
    Join Date
    Feb 2004
    Posts
    19
    Do you know if that will keep the pas like if you were clicked on a ASP:checkbox with AutoPostBack = "true" ?

    In other words when I enter to Page_Load it will think that the page is not loaded for first time?

  4. #4
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Yes, ASP.NET will know that the page has been reloaded. But the code will still be executed, unless you use the Page.IsPostBack method.

    Regards.

  5. #5
    Join Date
    Feb 2004
    Posts
    19
    Thanks for your help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles