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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Control value from one page to the other

Control value from one page to the other

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
4 Posts 4 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.
  • L Offline
    L Offline
    LucBite
    wrote on last edited by
    #1

    I want to use textbox value(text) in another asp.net page. eg. displaying txtName.Text from page1 in lblName in the next page OR use that value as a parameter passed to method calling under a button in the next page.

    ML Lingwati

    B B A 3 Replies Last reply
    0
    • L LucBite

      I want to use textbox value(text) in another asp.net page. eg. displaying txtName.Text from page1 in lblName in the next page OR use that value as a parameter passed to method calling under a button in the next page.

      ML Lingwati

      B Offline
      B Offline
      Blikkies
      wrote on last edited by
      #2

      Use a Session Object or a QueryString.

      1 Reply Last reply
      0
      • L LucBite

        I want to use textbox value(text) in another asp.net page. eg. displaying txtName.Text from page1 in lblName in the next page OR use that value as a parameter passed to method calling under a button in the next page.

        ML Lingwati

        B Offline
        B Offline
        Blue_Boy
        wrote on last edited by
        #3

        Use Session. Check this link.[^]


        I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com

        1 Reply Last reply
        0
        • L LucBite

          I want to use textbox value(text) in another asp.net page. eg. displaying txtName.Text from page1 in lblName in the next page OR use that value as a parameter passed to method calling under a button in the next page.

          ML Lingwati

          A Offline
          A Offline
          amitabha123
          wrote on last edited by
          #4

          LucBite wrote:

          I want to use textbox value(text) in another asp.net page. eg. displaying txtName.Text from page1 in lblName in the next page OR use that value as a parameter passed to method calling under a button in the next page.

          You can use session. Alternatively you can use PostBackURL features of .Net. For ex: Page1.aspx: ----------- <asp:textbox id="txt1" runat="server" ></asp:textbox> <asp:button id="Button1" postbackurl="~/page2.aspx" runat="server" text="Button" /> Page2.aspx: ----------- add this line under page directive: <%@ previouspagetype virtualpath="~/page1.aspx" %> Page2.aspx.cs: ----------- TextBox txt = (TextBox)PreviousPage.FindControl("txt1"); Response.Write( txt.Text);

          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