I believe what you want is the <asp:Literal>
, it serves precisely to display some static text, be it HTML
or not.
Example:
<form runat="server">
<asp:Literal id="meuLiteral" runat=server />
</form>
And in his Codebehind:
protected void Page_Load(object sender, EventArgs e)
{
meuLiteral.Text = "<font size="6">teste</font>";
meuLiteral.Mode = LiteralMode.PassThrough; /* sem modificações */
}
Textbox with CSS
Now if you want one <asp:textBox>
really, just create a css selector:
.textbox
{
font-size: 12px;
}
And in its component:
<asp:TextBox ID="TextBox1" CssClass="textbox" runat="server"></asp:TextBox>
protected void Page_Load(object sender, EventArgs e)
{
meuTextBox.Font.Size = FontUnit.Large;
}
You want your textbox (ex.:
<input type="text" />
) is formatted (CSS)?– Felipe Douradinho
I’m using
<asp:TextBox>
, I want the contents to be automatically formatted. I useAjaxTooKit
to theHTMLEditorExtender
.– Chirag Geiantilal
Sorry, I don’t think I can help. I can only change the general CSS.
– Felipe Douradinho
All I wanted was for
asp text box
showed the formatted text and not thetags
.– Chirag Geiantilal