Can I use another control in the Master Page (not Label) so that the variable is not written on the page?
(I know that I can set visible to false but is there another way to store this variable?
Thank you very much!
Main Topics
Browse All TopicsI have a master page with a treeview and I want to pass the onlick node value to a select statement that exists in the content page(in an sqldatasource control).
How can I do that?
(I want to pass that e.Node.Value from the master page to the content page)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You can use Session, which is the de facto way, and you can use a hidden form element, which is the other de facto way. It depends a bit what you're after, but indeed, a label is visible and is not the correct place for this info.
When the value is set during one postback, you can also simply make the property read/write and just set the property from your master event. However, if you need to keep it across postbacks and refreshes etc, you should store it in either the session or a hidden form element.
The user asked how to pass values from master to content, which was answered, and later followed up with an additional question (how to hide it from the user), which was also answered. I believe this question has received correct and good coverage. Please accept http:#24700133 as answer and http:#24700210 as assist.
Business Accounts
Answer for Membership
by: abelPosted on 2009-06-24 at 04:54:09ID: 24700133
To do that, you need to expose a property in your master page, set the MasterType to your masterpage to make the Page understand what type to expect. Then you can use the property. So, all three steps something like this:
Select allOpen in new window