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. add values from one page into textbox on another

add values from one page into textbox on another

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

    I have an asp.net page which contains a textbox and a hyperlink. When I click on the hyperlink it opens up a page with a list of hyperlinked values. I want that when I click on the hyperlink value on the other page, a value should be entered into the textbox on the original page basedupon the hyperlink I've clicked and the hyperlink list pages closes. Basically I want that my end user instead of having to enter in a string ID, instead selects it from the other page. Any ideas on how to do that guys :laugh:

    J J 2 Replies Last reply
    0
    • G gamerPotatoe

      I have an asp.net page which contains a textbox and a hyperlink. When I click on the hyperlink it opens up a page with a list of hyperlinked values. I want that when I click on the hyperlink value on the other page, a value should be entered into the textbox on the original page basedupon the hyperlink I've clicked and the hyperlink list pages closes. Basically I want that my end user instead of having to enter in a string ID, instead selects it from the other page. Any ideas on how to do that guys :laugh:

      J Offline
      J Offline
      Jeff Martin
      wrote on last edited by
      #2

      Why not just use a dropdown or a listbox? It seems less convoluted. If you just have to do it the way you describe, have the links on the second page link to "http://servername/pagename.aspx?stringID=ValueYouWantInTheTextBox" Then in your first page's Page_Load event, check the QueryString for a value in "stringID" and if it is there, put it in the TextBox. The first page will reload, so if that's a problem, you'll have to find a JavaScript solution. Jeff Martin My Blog

      1 Reply Last reply
      0
      • G gamerPotatoe

        I have an asp.net page which contains a textbox and a hyperlink. When I click on the hyperlink it opens up a page with a list of hyperlinked values. I want that when I click on the hyperlink value on the other page, a value should be entered into the textbox on the original page basedupon the hyperlink I've clicked and the hyperlink list pages closes. Basically I want that my end user instead of having to enter in a string ID, instead selects it from the other page. Any ideas on how to do that guys :laugh:

        J Offline
        J Offline
        Javier Lozano
        wrote on last edited by
        #3

        You can do it by using the opener property of the window object from the popup window. 1) In parent window use window.open(...) to open the window. 2) On the click event of the list of hyperlink, use the window.opener property (the parent window) to access the textbox. (window.opener.document.txtLinkValue.value = 'some text') Hope this helps! ~Javier Lozano (blog)

        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