Passing 'this' to a function

G

Gary Monk

I would like to create a class that changes some basic
attributes of a web page based on values in a database.
Things like background color, font, text color, etc. My
problem is that I'm not sure how to pass the
variable 'this' to a class function. I need to be able
modify the properties of the controls on the web page.

Has anyone done something like this?

Thanks for the help!
Gary
 
K

Kevin Spencer

I believe your problem lies in the fact that your function defines the
parameter type as a reference to the Base Page class, rather than a
reference to your inherited Page class. The types don't match exactly.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.
 

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
474,102
Messages
2,570,645
Members
47,245
Latest member
ShannonEat

Latest Threads

Top