I have an application that I need to support. There is a webcontrol that loops through some data and builds a string of html using StringBuilder and then outputs the HTML to the screen.
I need to make one of the links in the HTML string an asp:HyperLink so I can use to to run some server code.
I have tried adding the asp:HyperLink to the string. I was hoping that it would still get interpreted as ASP but no go.
Is this possible? Or is there a better what without totally re-writing the code?
String Builder and ASP.net Controls
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Pankaj Gupta66 reputationPosted Dec 16, 2008, 8:31 PM EST
For this you can use the link button control at place of hyper link control. Basically hyperlink is a literal control.
lkool3 reputationPosted Dec 17, 2008, 11:50 AM EST
here is an example:
mySB = new Stringbuilder
mySB.Append("