Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Force a postback from asp code behind

Force a postback from asp code behind

Scheduled Pinned Locked Moved ASP.NET
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steve Holdorf
    wrote on last edited by
    #1

    I need to force a postback from the asp code behind. Can this be done?

    S 1 Reply Last reply
    0
    • S Steve Holdorf

      I need to force a postback from the asp code behind. Can this be done?

      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      Postback's are generally triggered based on some action from user. Since you have not explained your scenario on what you want and why you are in need of such a scenario it is difficult to suggest alternative or other possible way. Right now, if you are aware of page Life cycle, all you are trying to ask/do by second postback is repeat few of already executed events and just raise the previous event handlers again. Still if you are looking for ways to do, possible ways: 1. Raise a postback from Javascript. Use RegisterClientScript from code behind to trigger it. 2. You can do a Response.Redirect(Request.RawUrl); // transferring the execution back to same page

      Sandeep Mewara [My last article]: Server side Delimiters in ASP.NET[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups