Saturday, March 24, 2012

Text to System.Web.UI.Control

Hi NG!
Is there a function in the .net FX that returns a
System.Web.UI.Control's inherited class for a specified text?
Means, if you specify
<a href="http://links.10026.com/?link=http://www.microsoft.com/" title="Microsoft">Microsoft
Corporation</a>
it should return an instance of System.Web.UI.HtmlAnchor or
System.Web.UI.WebControls.LinkButton, where Href, Title, and InnerText
are set appropriately.
Thanks for any hint!
Best regards,
MichaelThere's nothing in .Net to do this...there might be third party tools
though...couldn't quickly find anything..
Karl
"Michael Kremser" <mkspamx-usenet@.yahoo.de> wrote in message
news:%23Q2L26rkEHA.3432@.TK2MSFTNGP14.phx.gbl...
> Hi NG!
> Is there a function in the .net FX that returns a
> System.Web.UI.Control's inherited class for a specified text?
> Means, if you specify
> <a href="http://links.10026.com/?link=http://www.microsoft.com/" title="Microsoft">Microsoft
> Corporation</a>
> it should return an instance of System.Web.UI.HtmlAnchor or
> System.Web.UI.WebControls.LinkButton, where Href, Title, and InnerText
> are set appropriately.
> Thanks for any hint!
> Best regards,
> Michael
Note, that in you example you don't have a server-side control in the first
place since there is no runat=server attribute.
Eliyahu
"Michael Kremser" <mkspamx-usenet@.yahoo.de> wrote in message
news:%23Q2L26rkEHA.3432@.TK2MSFTNGP14.phx.gbl...
> Hi NG!
> Is there a function in the .net FX that returns a
> System.Web.UI.Control's inherited class for a specified text?
> Means, if you specify
> <a href="http://links.10026.com/?link=http://www.microsoft.com/" title="Microsoft">Microsoft
> Corporation</a>
> it should return an instance of System.Web.UI.HtmlAnchor or
> System.Web.UI.WebControls.LinkButton, where Href, Title, and InnerText
> are set appropriately.
> Thanks for any hint!
> Best regards,
> Michael

0 comments:

Post a Comment