Mensaje
General information
Foro:
ASP.NET
Category:
Web forms
Miscellaneous
ID de la conversación:
01450276
ID del mensaje:
01450292
Views:
51
>On my main form I have a treeview. When a tree node link is clicked I want to open another form, passing some data to the second form.
>
>I have the NavigateURL property of the node set tp the name of the second page, and the second page opens fine when I click the node. I just need to know how to pass a value to the second page.

Depending on the amount and type of information you can just pass it in the URL, ex:
// If your URL was this:
// http://www.levelextreme.com/MyNewPage.aspx?ParameterName=ParameterValue

// You can access the value from the new page using code like this:
// The ?? stuff basically just returns the "" portion if Request.QueryString["ParameterName"] returns null 
// (for example, it wasn't passed in)
string paramValue = Request.QueryString["ParameterName"] ?? "";
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Responder
Mapa
Ver