Is this possible? Calling a sub in a Child webpage from the Master webpage

MikeCombe
MikeCombe used Ask the Experts™
on
I am using a MasterPage & a default.aspx page

The MasterPage contains a <asp:DropDownList control.
When this ddl changes, it fires this sub:
 Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As [Object], ByVal e As EventArgs)

I have a sub in Default.aspx code-behind that uses the value set in the <asp:DropDownList control DropDownList1. The sub name is doStuff_default()

Is there a way to call the sub doStuff_default() from the MasterPage code-behind DropDownList1_SelectedIndexChanged ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Consultant Software Engineer - .NET Architect
Commented:
Hi,

Following artical explains what you want.

http://www.codeproject.com/Articles/36107/Master-Page-and-Content-Page-Interaction

Thanks
Meir RivkinFull stack Software Engineer
Commented:
>>I have a sub in Default.aspx code-behind that uses the value set in the <asp:DropDownList control DropDownList1. The sub name is doStuff_default()

is this function uses members from Default.aspx.cs?
can't you declare it as a service function which is not tightly binded to the default page?
Vikram Singh SainiSoftware Engineer cum AD Developer
Commented:
Hi,

The solution to your problem lies at : Access Content page from Master page

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial