c# - adding text to legend from code behind -


how can add text legend code behind

assuming you're talking html legend tag , using c# in asp.net site. can give id , runat="server" can access code behind name , change text property.

<form id="form1" runat="server"> <fieldset> <legend id="mylegend" runat="server">personalia:</legend> name: <input type="text" size="30" /><br /> email: <input type="text" size="30" /><br /> date of birth: <input type="text" size="10" /> </fieldset> </form> 

then in code behind:

mylegend.innertext = "foo"; 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -