• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 705
  • Last Modified:

Loading a usercontrol from a class file?

I have a blank ascx user control in my web project that uses the "loadcontrol" method in the code-behind file.

Code-Behind.vb  >>>> LoadControl >>>> UserControl.ascx

Is there another way to use the loadcontrol method without using an ascx code-behind?

For example, can I just use some *class* file elsewhere and direct it to any usercontrol,
or is it required to be in the *code behind* file of the usercontrol?

Class.vb >>>> LoadControl >>>> UserControl.ascx

Doesn't it boil down to the question, can any class inherit a page, etc?

Ideas?
0
born4code
Asked:
born4code
1 Solution
 
prajeebkumarCommented:
can you use asp:placeholder for this?

http://www.charon.co.uk/content.aspx?CategoryID=28&ArticleID=43

this will work for asp.net 1.1  also.
0
 
born4codeAuthor Commented:
I am using a placeholder.
The more I think about this, I think that I asked my question wrong.

Well, this one was asked wrong... and I am going to have to re-do it.
I am just going to give you the points, I will do this one again.

0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

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