How to apply master pages to ascx files.

M

Max2006

Hi,

Is there any technique that allows me to have a usercontrols based on
MasterPages?
I know that MasterPages are designed for aspx pages. I wonder that I can
apply them to ascx files.

Thank you,
Max
 
W

Walter Wang [MSFT]

Hi Max,

I'm afraid MasterPages cannot be used on UserControl.

However, I'm not sure your objective here. Based on my understanding,
UserControl is designed to be re-used. For example: if you need to use the
controls layout in a UserControl, simply put an instance of it on your new
UserControl.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Mark Rae [MVP]

Is there any technique that allows me to have a usercontrols based on
MasterPages?

No - in fact, MasterPages are UserControls too...
I know that MasterPages are designed for aspx pages. I wonder that I can
apply them to ascx files.

Generally speaking, a UserControl is designed for re-use, so you shouldn't
need to worry about this - just drop it onto the page where required, and
let its controls assume their styles from whichever CSS is in use for the
main page...
 
W

Walter Wang [MSFT]

Hi Max,

I'm writing to check the status of this post. Please feel free to let me
know if there's anything else I can help. Thanks.

Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top