evo_x
asked on
TextBox rendered as <h1> tag
How can I make a textbox to be rendered in the html file as <h1> tag?
I have this detailsview template and I have tried to put the textbox inside the <h1> tag, but in the html file the <h1> tag is not included...
I have this detailsview template and I have tried to put the textbox inside the <h1> tag, but in the html file the <h1> tag is not included...
<EditItemTemplate>
<h1>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Car_Category") %>'></asp:TextBox>
</h1>
</EditItemTemplate>
Give your textbox a CssClass property.
Then in that class define the css properties for your textbox for it to look like h1 tag.
<asp:TextBox ID="TextBox1" runat="server" CssClass="Class1" Text='<%# Bind("Car_Category") %>'></asp:TextBox>
in your style tag
.Class1
{
font-size:18px;
font-weight:bold;
}
Then in that class define the css properties for your textbox for it to look like h1 tag.
<asp:TextBox ID="TextBox1" runat="server" CssClass="Class1" Text='<%# Bind("Car_Category") %>'></asp:TextBox>
in your style tag
.Class1
{
font-size:18px;
font-weight:bold;
}
ASKER
I don't want just look like a h1 tag, but I want to be rendered in the html file to <h1>mytextbox text</h1>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Then is this possible with the label control?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, thanks !
So, write a StyleSheet class (resembling h1 tag style properties) and set the class to this textbox. So, your textbox text will look like <h1> tag style. Let me know, you want different.