Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

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

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 ?
0
MikeCombe
Asked:
MikeCombe
3 Solutions
 
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
Hi,

Following artical explains what you want.

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

Thanks
0
 
Meir RivkinFull stack Software EngineerCommented:
>>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?
0
 
Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
Hi,

The solution to your problem lies at : Access Content page from Master page
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now