the control is simple, define it in the page behind, change the tag on the
aspx page, and you're done.
public class mylabel : Label
{
protected override Render(HtmlTextWriter output)
{
output.Write("whatever I want");
}
}
-- bruce (sqlwork.com)
"Jason Dean" <jd******@yahoo.com> wrote in message
news:90*******************@fe06.lga...
| How exactly does this work? I've tried writing to a variable (ideal
choice)
| and can't seem to figure it out. Do you have any examples or links you
| could send me?
|
| Thanks soooooo much!
|
| -Jason
|
| "bruce barker" <no***********@safeco.com> wrote in message
| news:Ow**************@TK2MSFTNGP11.phx.gbl...
| > you could create a new HtmlTextWriter wrapped around a stringwriter, to
| > build the string, or create a new control (my choice).
| >
| > -- bruce (sqlwork.com)
| >
| > "Jason Dean" <jd******@yahoo.com> wrote in message
| > news:N3******************@fe06.lga...
| > | Hello,
| > |
| > | I have a simple asp:label control that I want to write some
complicated
| > HTML
| > | to. Currently I have this code and it works fine:
| > |
| > | myLable.Text = "<p>this is my text</p>"
| > |
| > | Bust as my HTML gets more complicated I want to be able to use the
| > | HTMLTextWriter to write the HTML like so:
| > |
| > | writer.Write (@"
| > |
| > | <p>this is my text</p>
| > | <p>this is more text</p>
| > | <p>this is alot more text</p>
| > |
| > | ")
| > |
| > | What is the best way to go about this?
| > |
| > | Thx
| > |
| > |
| >
| >
|
|