Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Teemu Keiski #1
Re: How do I get absolute position deriving from Control instead of WebControl?
I remember Nikhil Kothari discussing about this at ASP.NET Forums and he
said it is impossible unless you derive from WebControl.
--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
[url]http://www.mansoft.fi[/url]
AspInsiders Member, [url]www.aspinsiders.com[/url]
ASP.NET Forums Moderator, [url]www.asp.net[/url]
AspAlliance Columnist, [url]www.aspalliance.com[/url]
"Rob Mayo" <Rob.Mayo@WestonSolutions.com> wrote in message
news:%23EgLmUUTDHA.2480@tk2msftngp13.phx.gbl...
I have a server control that I derived from
System.Web.UI.WebControls.WebControl. I want the change it to derive from
System.Web.UI.Control so that it does not have all the extraneous
properties. Like a superfluous third nipple, I want them gone.
I can live with not having Height, Width, or TabIndex. I used to just take
these properties and insert them into the content I produced from my
overridden Render. I can implement these myself. No problem
I used to take the Attributes property, grab Style from if and plop it in my
rendered content to absolutely/relatively position my control. The
Attributes property never existed in Control.
How can I get the position of my control if the page is in GridLayout or
FlowLayout when deriving from Control?
-------vbcode-------
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
strObjectText = Replace(strObjectText, "[ABSPOSTOKEN]",
Me.Attributes("style"))
Return strObjectText
End Sub
Teemu Keiski Guest
-
Position Absolute (CSS) in IE and Firefox
:confused; I don't know if my problem is (a) a CSS issue/mistake (b) a discrepancy between browsers or (c) an issue with the PVII ShowPic... -
How to position a custom webcontrol relatively under vs.net 2005?
When I update my webcontrol form .net 2003 to .net 2005, one question occured. My webcontrol can not be moved when it is put on a web form.... -
anchor to link to an absolute position
I'm a newbie to this forum. Just installed Studio 8. Been building sites with MS FrontPage, so bare with me. Thanks. I want the anchor to link to... -
Center image using position: absolute?
I have an image (it's a navigation bar) that should appear with a specifc vertical position; so I'm using absolute positioning to put it a precise... -
ASP.NET Custom WebControl Absolute Positioning
Hi, I'm currently in the process of building a custom webcontrol. I nearly finished it, however one thing is a mystery to me: how do i enable the... -
Rob Mayo #2
Re: How do I get absolute position deriving from Control instead of WebControl?
I very much doubt that. Logically it doesn't make sense. If WebControl
derives from Control, then how does WebControl do it? Somewhere someone
wrote the code to posittion a WebControl. All I want is that code, you know?
"Teemu Keiski" <joteke@aspalliance.com> wrote in message
news:OI5ihuVTDHA.1916@TK2MSFTNGP12.phx.gbl...my> I remember Nikhil Kothari discussing about this at ASP.NET Forums and he
> said it is impossible unless you derive from WebControl.
>
> --
> Teemu Keiski
> MCP, Designer/Developer
> Mansoft tietotekniikka Oy
> [url]http://www.mansoft.fi[/url]
>
> AspInsiders Member, [url]www.aspinsiders.com[/url]
> ASP.NET Forums Moderator, [url]www.asp.net[/url]
> AspAlliance Columnist, [url]www.aspalliance.com[/url]
>
> "Rob Mayo" <Rob.Mayo@WestonSolutions.com> wrote in message
> news:%23EgLmUUTDHA.2480@tk2msftngp13.phx.gbl...
> I have a server control that I derived from
> System.Web.UI.WebControls.WebControl. I want the change it to derive from
> System.Web.UI.Control so that it does not have all the extraneous
> properties. Like a superfluous third nipple, I want them gone.
>
> I can live with not having Height, Width, or TabIndex. I used to just take
> these properties and insert them into the content I produced from my
> overridden Render. I can implement these myself. No problem
>
> I used to take the Attributes property, grab Style from if and plop it inSystem.Web.UI.HtmlTextWriter)> rendered content to absolutely/relatively position my control. The
> Attributes property never existed in Control.
>
> How can I get the position of my control if the page is in GridLayout or
> FlowLayout when deriving from Control?
>
> -------vbcode-------
> Protected Overrides Sub Render(ByVal output As> strObjectText = Replace(strObjectText, "[ABSPOSTOKEN]",
> Me.Attributes("style"))
> Return strObjectText
> End Sub
>
>
Rob Mayo Guest
-
Teemu Keiski #3
Re: How do I get absolute position deriving from Control instead of WebControl?
Yeah, it doesn't. I believe the IDE has also something to say about that (as
controls are positioned there, although it just should be attributes that
handle the placing) . Sure it is coded somewhere. You might just need
appropriate tools to dig it out.
The thread at ASP.NET forums I mentioned:
[url]http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=221779[/url]
--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
[url]http://www.mansoft.fi[/url]
AspInsiders Member, [url]www.aspinsiders.com[/url]
ASP.NET Forums Moderator, [url]www.asp.net[/url]
AspAlliance Columnist, [url]www.aspalliance.com[/url]
"Rob Mayo" <Rob.Mayo@WestonSolutions.com> wrote in message
news:eKY1GzVTDHA.1868@TK2MSFTNGP11.phx.gbl...know?> I very much doubt that. Logically it doesn't make sense. If WebControl
> derives from Control, then how does WebControl do it? Somewhere someone
> wrote the code to posittion a WebControl. All I want is that code, youfrom>
> "Teemu Keiski" <joteke@aspalliance.com> wrote in message
> news:OI5ihuVTDHA.1916@TK2MSFTNGP12.phx.gbl...> > I remember Nikhil Kothari discussing about this at ASP.NET Forums and he
> > said it is impossible unless you derive from WebControl.
> >
> > --
> > Teemu Keiski
> > MCP, Designer/Developer
> > Mansoft tietotekniikka Oy
> > [url]http://www.mansoft.fi[/url]
> >
> > AspInsiders Member, [url]www.aspinsiders.com[/url]
> > ASP.NET Forums Moderator, [url]www.asp.net[/url]
> > AspAlliance Columnist, [url]www.aspalliance.com[/url]
> >
> > "Rob Mayo" <Rob.Mayo@WestonSolutions.com> wrote in message
> > news:%23EgLmUUTDHA.2480@tk2msftngp13.phx.gbl...
> > I have a server control that I derived from
> > System.Web.UI.WebControls.WebControl. I want the change it to derivetake> > System.Web.UI.Control so that it does not have all the extraneous
> > properties. Like a superfluous third nipple, I want them gone.
> >
> > I can live with not having Height, Width, or TabIndex. I used to justin> > these properties and insert them into the content I produced from my
> > overridden Render. I can implement these myself. No problem
> >
> > I used to take the Attributes property, grab Style from if and plop it> my> System.Web.UI.HtmlTextWriter)> > rendered content to absolutely/relatively position my control. The
> > Attributes property never existed in Control.
> >
> > How can I get the position of my control if the page is in GridLayout or
> > FlowLayout when deriving from Control?
> >
> > -------vbcode-------
> > Protected Overrides Sub Render(ByVal output As>> > strObjectText = Replace(strObjectText, "[ABSPOSTOKEN]",
> > Me.Attributes("style"))
> > Return strObjectText
> > End Sub
> >
> >
>
Teemu Keiski Guest
-
Victor Garcia Aprea [MVP] #4
Re: How do I get absolute position deriving from Control instead of WebControl?
I tackle this "resizing and moving" deriving from Control, about a year and
half ago, just as an experiment while learning how the design-time support
worked.
The main issue is that the provided designers, when it comes to moving and
resizing were built for handling with WebControl-derived classes only, you
can notice that looking at all the explicit checks that ControlDesigner
makes looking if its designing a WebControl-derived class. This sounds
pretty logical also, as WebControl offers the minimum required
functionallity that is needed in order to be moved and resized while Control
doesn't provide that.
That said, you *could* actually make some of this stuff work for a
Control-derived class. I remember having coding a Control-derived class that
could be resized and it worked okay. But the additional code required isn't
worth it when compared to inheriting from WebControl (even if you may be
inheriting some stuff you don't really want). After giving it a shot, I've
always recommended several times in many posts to inherit from WebControl in
order to get this funcionallity.
btw, it has been publicy said that vNext will include some kind of
intermeditate control between WebControl and Control just to provide this
functionallity.
--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
[url]http://obies.com/vga/blog.aspx[/url]
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.
"Teemu Keiski" <joteke@aspalliance.com> wrote in message
news:eOhTCYdTDHA.2008@TK2MSFTNGP11.phx.gbl...(as> Yeah, it doesn't. I believe the IDE has also something to say about thathe> controls are positioned there, although it just should be attributes that
> handle the placing) . Sure it is coded somewhere. You might just need
> appropriate tools to dig it out.
>
> The thread at ASP.NET forums I mentioned:
> [url]http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=221779[/url]
>
> --
> Teemu Keiski
> MCP, Designer/Developer
> Mansoft tietotekniikka Oy
> [url]http://www.mansoft.fi[/url]
>
> AspInsiders Member, [url]www.aspinsiders.com[/url]
> ASP.NET Forums Moderator, [url]www.asp.net[/url]
> AspAlliance Columnist, [url]www.aspalliance.com[/url]
>
>
> "Rob Mayo" <Rob.Mayo@WestonSolutions.com> wrote in message
> news:eKY1GzVTDHA.1868@TK2MSFTNGP11.phx.gbl...> know?> > I very much doubt that. Logically it doesn't make sense. If WebControl
> > derives from Control, then how does WebControl do it? Somewhere someone
> > wrote the code to posittion a WebControl. All I want is that code, you> >
> > "Teemu Keiski" <joteke@aspalliance.com> wrote in message
> > news:OI5ihuVTDHA.1916@TK2MSFTNGP12.phx.gbl...> > > I remember Nikhil Kothari discussing about this at ASP.NET Forums andor> from> > > said it is impossible unless you derive from WebControl.
> > >
> > > --
> > > Teemu Keiski
> > > MCP, Designer/Developer
> > > Mansoft tietotekniikka Oy
> > > [url]http://www.mansoft.fi[/url]
> > >
> > > AspInsiders Member, [url]www.aspinsiders.com[/url]
> > > ASP.NET Forums Moderator, [url]www.asp.net[/url]
> > > AspAlliance Columnist, [url]www.aspalliance.com[/url]
> > >
> > > "Rob Mayo" <Rob.Mayo@WestonSolutions.com> wrote in message
> > > news:%23EgLmUUTDHA.2480@tk2msftngp13.phx.gbl...
> > > I have a server control that I derived from
> > > System.Web.UI.WebControls.WebControl. I want the change it to derive> take> > > System.Web.UI.Control so that it does not have all the extraneous
> > > properties. Like a superfluous third nipple, I want them gone.
> > >
> > > I can live with not having Height, Width, or TabIndex. I used to just> in> > > these properties and insert them into the content I produced from my
> > > overridden Render. I can implement these myself. No problem
> > >
> > > I used to take the Attributes property, grab Style from if and plop it> > my> > > rendered content to absolutely/relatively position my control. The
> > > Attributes property never existed in Control.
> > >
> > > How can I get the position of my control if the page is in GridLayout>> > System.Web.UI.HtmlTextWriter)> > > FlowLayout when deriving from Control?
> > >
> > > -------vbcode-------
> > > Protected Overrides Sub Render(ByVal output As> >> > > strObjectText = Replace(strObjectText, "[ABSPOSTOKEN]",
> > > Me.Attributes("style"))
> > > Return strObjectText
> > > End Sub
> > >
> > >
> >
>
Victor Garcia Aprea [MVP] Guest



Reply With Quote

