Master Pages

J

Just Me

Hi

I have a master page with a control on it, but I need to set a property of
that control from the content.

my master page is called Admin.Master and the class is Admin.


I have tried this

dim mp as Admin

mp = Ctype(me.master, Admin)


But I get the error that ASP.Master_Admin cannot be converted to Admin

How can I do this ?

Thanks
 
M

mike

Hi

I have a master page with a control on it, but I need to set a property of
that control from the content.

my master page is called Admin.Master and the class is Admin.

I have tried this

dim mp as Admin

mp = Ctype(me.master, Admin)

But I get the error that ASP.Master_Admin cannot be converted to Admin

How can I do this ?

Thanks

in CS you do something like this:

Code behind in page that refers to master (content)
This example sets the Text property of a label that is on the master
page.

protected void Page_Load(object sender, EventArgs e)
{
Label mylbl = (Label)Page.Master.FindControl("Label1");
mylbl.Text = "Testing";
}

HTH

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top