How to pass public variables from a parent to child ASCX

J

John Cosmas

I'm reusing my top and bottom borders by using placeholders. I need to pass
public level variables from the parent to the child instead of using Session
variables. How could I do that so that the child level ASCX files can read
what the parent uses?
 
K

Karl

vb.net:
dim value as string = ctype(Page, WebForm1).PublicValue

c#
string value = ((WebForm1)Page).PublicValue

In other words, cast the Page to the type of the page and you can access its
public properties.

karl
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top