Click here to Skip to main content
15,891,762 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have two master page one is User.Master and Other is Account.Master
I want to find User.Master Dropdown selected value on Account.Master Page .
Please give me suggestion and help me. They are not nested master Page

Thanks
Posted
Updated 3-Aug-15 20:45pm
v2
Comments
Suvendu Shekhar Giri 4-Aug-15 1:56am    
Is Account.master a child page of User.master?
Member 10711621 4-Aug-15 2:44am    
they are not nested master page

1 solution

If Account.master is a child page of User.master then you can find controls of User.master page by doing something like following-
C#
ContentPlaceHolder cp = this.Master.FindControl("ContentPlaceHolderIdOfUserMaster") as ContentPlaceHolder;
DropDownList drp = cp.FindControl("drpYourDrpId") as DropDownList ;


Else, you can use other state management techniques like Session,Cookies etc. to pass value from one independent master page to another independent master page.
For this purpose, check these links-
Transferring page values to another page[^]
How to: Pass Values Between ASP.NET Web Forms Pages
[^]

Hope, it helps :)
 
Share this answer
 
Comments
Member 10711621 4-Aug-15 2:45am    
they are not nested master page
Suvendu Shekhar Giri 4-Aug-15 2:48am    
Then you can pass value through state management techniques. Check this link
Transferring page values to another page[^]

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