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