Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass Paramerer To Web Form
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
01450276
Message ID:
01450292
Views:
48
>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
Reply
Map
View

Click here to load this message in the networking platform