Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can i use page.aspx' s ID to masterpage?

tat master page is inherited by page.aspx ....

i hv 2 dropdown box on master page .. and 1 asp:DataList ID="dlImages" which is on page.aspx
i want to use DataList ID="dlImages" in master page.cs



my task is tat i want to show images in page.aspx while selecting city and category from dropdownbox which is on master page
Posted
Updated 21-Feb-13 19:46pm
v3
Comments
[no name] 22-Feb-13 1:51am    
make query string or session and store the value of city and category on it!!!
second thing retrieve session and make url for your image and show it on datalist

1 solution

Yes you can achive this by you can get master page controls in content page and vice versa
Get Master page control in Content page below syntax
DropDownList ddl = (DropDownList)Page.Master.FindControl("DropDownList5");

Get Content page control in Master page below syntax

DropDownList ddl = (DropDownList)MainContent.FindControl("DropDownList1");
 
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