Peter's Gekko

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Use an usercontrol in another application

I'm wild about usercontrols, aka ascx'es. Very very usefull. But they do have one drawback : you cannot use a usercontrol in another application. Asp.net will tell you (at runtime) “this cannot be allowed”. Because it contains markup ? Pitty.

Peter


Posted 06-02-2004 10:55 AM by pvanooijen

[Advertisement]

Comments

Scott Galloway wrote re: Use an usercontrol in another application
on 06-02-2004 7:18 AM
I came across a utility (on Codeproject I think) a while ago that compiled UserControls to Server Controls, take a look here: http://www.codeproject.com/aspnet/ascxparser.asp
Brian Beatty wrote re: Use an usercontrol in another application
on 06-02-2004 6:36 PM
I was on a project that used user controls across web applications. It took a little work, with Virtual Directories and fun with ~\ and references the other projects.
Peter van Ooijen wrote re: Use an usercontrol in another application
on 06-03-2004 2:08 AM
Several of my web-apps merged into one big system. What I wanted to do is have a common page header, with the version # and some basic links. After parsing it into a custom control it would become complicated to update it. And i can't make life to hard on the sa.
What I do now is just generate the html myself in the render of my base form. Works, but is not very visual.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?