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. Big Question with WebForm

Big Question with WebForm

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 3 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.
  • X Offline
    X Offline
    XGaMeS
    wrote on last edited by
    #1

    If i generate controls dynamically, and then goes to another page ... when I come back to this page throught a Response.redirect, do the controls will be there ? And if not is there an way to keep them here ? !!!!!!!!!!!!!!!

    P C 2 Replies Last reply
    0
    • X XGaMeS

      If i generate controls dynamically, and then goes to another page ... when I come back to this page throught a Response.redirect, do the controls will be there ? And if not is there an way to keep them here ? !!!!!!!!!!!!!!!

      P Offline
      P Offline
      PSK_
      wrote on last edited by
      #2

      case 1: I think that if you are generating the controls at the page load event then after visiting another page when u come back to the original page then u'll get the controls. Coz at Response.redirect the page load event is executed. Case 2: Suppose you are generating the controls in some other function which is not linked with the page load event then you can do one thing. create the query string like that u'll get information that u r visiting back to this page like. Response.Redirect("page1.aspx?vis=1") now in the page load event u can check the querystring count if it is greater than 0 and vis = 1 than call the method or function which is generating the dynamic controls. Case 3: If you like, instead of using response.redirect u can use javascript code window.history.back(); but i don't think that this approach is gud.

      [

      ](HTTP://PRAKASH-K.BLOGSPOT.COM)

      1 Reply Last reply
      0
      • X XGaMeS

        If i generate controls dynamically, and then goes to another page ... when I come back to this page throught a Response.redirect, do the controls will be there ? And if not is there an way to keep them here ? !!!!!!!!!!!!!!!

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        XGaMeS wrote: If i generate controls dynamically, and then goes to another page ... when I come back to this page throught a Response.redirect, do the controls will be there? No, once the page is rendered and sent to the client all the objects associated with the page are destroyed. XGaMeS wrote: And if not is there an way to keep them here? Yes, but it is application specific. You can either get the information you used in the first place to generate the controls, or your can store the state of the controls somewhere and use that state information to reinstantiate them.


        "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!

        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