Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.aspnet.webcontrols
weird designer behavior with composite controls...
Klaus Salchner
2/28/2004 8:54:00 AM
I have a custom control
public SmartToolbox : WebControl, INamingContainer
it does not override render...as we just create child controls we add to our
Controls collection
Label t = new Label();
t.Text = "ll";
Controls.Add(t);
Now, when I drag the control onto the designer...it does not render
itself...when I launch the app it renders nicely in IE. The only way how I
can get this control to render on the designer is to override OnInit
protected override void OnInit(...)
{
base.OnInit(...);
EnsureChildControls;
}
Now the next odd behavior is that when I expose a property called Text and
make it visible to the designer (property pane). I see the property, I can
change it and it persists in the HTML (I can see it). But I can't get the
designer to re-render itself to also show the updated text on the designer.
I can only do that by closing the designer and opening it again, which of
course triggers the OnInit above.
Can someone tell me what I am doing wrong here? Or is this a know issue of
the designer in VS.NET 2003?
Regards, Klaus
-----------------------------------------------
Klaus Salchner
email: klaus.salchner@telus.net
Proud member of
http://li...
- become part of my professional network; it's a free
3rd party tool
http://got...
http://theserv...
1 Answer
Teemu Keiski
3/1/2004 5:35:00 AM
0
Hi,
check these:
http://www.dotnet247.com/247reference/msgs/14/...
http://www.dotnet247.com/247reference/msgs/32/1...
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Klaus Salchner" <klaus.salchner@telus.net> wrote in message
news:%23TLtTfd$DHA.3284@TK2MSFTNGP09.phx.gbl...
> I have a custom control
>
> public SmartToolbox : WebControl, INamingContainer
>
> it does not override render...as we just create child controls we add to
our
> Controls collection
>
> Label t = new Label();
> t.Text = "ll";
> Controls.Add(t);
>
> Now, when I drag the control onto the designer...it does not render
> itself...when I launch the app it renders nicely in IE. The only way how I
> can get this control to render on the designer is to override OnInit
>
> protected override void OnInit(...)
> {
> base.OnInit(...);
> EnsureChildControls;
> }
>
> Now the next odd behavior is that when I expose a property called Text and
> make it visible to the designer (property pane). I see the property, I can
> change it and it persists in the HTML (I can see it). But I can't get the
> designer to re-render itself to also show the updated text on the
designer.
> I can only do that by closing the designer and opening it again, which of
> course triggers the OnInit above.
>
> Can someone tell me what I am doing wrong here? Or is this a know issue of
> the designer in VS.NET 2003?
>
> Regards, Klaus
> -----------------------------------------------
> Klaus Salchner
> email: klaus.salchner@telus.net
>
> Proud member of
>
http://li...
- become part of my professional network; it's a free
> 3rd party tool
>
http://got...
>
http://theserv...
>
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
weird designer behavior with composite controls...
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password