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. PreviousPage | asp.net 2.0

PreviousPage | asp.net 2.0

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelp
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.
  • K Offline
    K Offline
    Karan_TN
    wrote on last edited by
    #1

    hi, currently i m working in asp.net 2.0 (2005). 1st time i m using the previousPage process.i tried to retrive a hidden variable (source page) value to my destination page. 1. i set the PostBackURl as my destination page on the button click on source page 2. i put the following coding in the destination onload event.

    if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack))
    Label1.Text = System generated ID : " + Convert.ToString(PreviousPage.FindControl("HidTest"));

    but always the PreviousPage is null and not coming inside the loop. help me please - Karan

    M 1 Reply Last reply
    0
    • K Karan_TN

      hi, currently i m working in asp.net 2.0 (2005). 1st time i m using the previousPage process.i tried to retrive a hidden variable (source page) value to my destination page. 1. i set the PostBackURl as my destination page on the button click on source page 2. i put the following coding in the destination onload event.

      if ((PreviousPage != null) && (PreviousPage.IsCrossPagePostBack))
      Label1.Text = System generated ID : " + Convert.ToString(PreviousPage.FindControl("HidTest"));

      but always the PreviousPage is null and not coming inside the loop. help me please - Karan

      M Offline
      M Offline
      michaelschmitt
      wrote on last edited by
      #2

      Hi, you say PreviousPage is always null. When is the code you posted actually run? If it is on a postback, PreviousPage is null, because there is no PreviousPage then. You should save the value in a "If(!IsPostback)" part of your page load. This is just a guess i'm afraid. Good Luck

      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