Click here to Skip to main content
15,939,065 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As the Question says,Let me explain the scenario
I have a masterpage
I have a child page which has some li's

<div class="ui-block-a btn-state"><a href="#" class="ui-btn ui-shadow ui-corner-all"  önclick="')">Mumbai</a></div>

on the click of this div I want to save the innertext of anchor tag in the hiddenfied value which was declared on master page. How to set the value of hidden field

I have a 3 page which is called when the anchor or div on the second page is clicked now I want to get the value of the hidden filed on this page(using codebehind)

How to set the value of hidden field and then fetch that value in code behind
Can you please tell me how can this be achieved.?? Also can any one give similar solution with Viewstate. Thanks in advance.
Updated 24-May-14 1:14am

1 solution

I am giving you example of accessing masterpage textbox or label to from content page.. :)

Label masterlbl = (Label)Master.FindControl("lblMaster");
TextBox mastertxt = (TextBox) Master.FindControl("txtMaster");

How to access master page controls from content page[^]

Working with ASP.NET Master Pages Programmatically[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900