Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Web Control that looks like a Component in the designer

Reply
Thread Tools

Web Control that looks like a Component in the designer

 
 
justncase80
Guest
Posts: n/a
 
      10-11-2005
Hello,
I have a webcontrol that I have created that cannot be edited in the
designer and is automatically resized and repositioned by the browser
at load time and therefore has no need to be positioned in the designer
or rendered for previewing. So what I want to do is to know how to
create a desinger class that will allow my webcontrol to be drawn in
the designer as if it were a composite control but still render to the
window as a webcontrol. Here is a sample of what I *wish* I could do:

namespace MyControls
{
[
ToolboxData("<{0}:MyWebControl runat=\"server\">
</{0}:MyWebControl>"),
Designer(MyControls.MyComponentDesigner,
typeof(ComponentDesigner))
]
public MyWebControl : WebControl
{
//...
public override void Render(HtmlWriter output)
{
base.Render(output);
}
}

public class MyComponentDesigner : ComponentDesigner
{
//...
}
}


This seems like it should work but I can't seem to get it right! The
component designer seems like it just won't work with a WebControl!
Does anyone know how to do this?

Thanks,
Justin Chase

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
acts like an anchor, i.e., links to another page, but looks like a button AAaron123 ASP .Net 11 11-27-2008 01:01 PM
Torrent looks good. . . converted DVD files looks horrible. . . WHY!?! novak.arthur@gmail.com DVD Video 4 02-11-2007 06:57 PM
A swing/awt component that looks like a LED =?iso-8859-1?q?J=FCrgen_Gerstacker?= Java 2 12-17-2006 09:26 AM
User Control (Winforms) doesn't display in web page. looks like unloaded image Joe ASP .Net 1 12-21-2004 06:48 PM



Advertisments