Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Dec 24, 2010 7:58 am

If i want to use C# code in asp.net pages to control HTML elements, what should i do?

For example:
I want to change the content of span tag or td tag when load page...
that means write c# code in Default.aspx.cs for example to change Span content

justinx1016
 
Posts: 4
Joined: Fri Dec 24, 2010 1:21 am

Fri Dec 24, 2010 8:55 am

HTML

<h1 id="Heading1" runat="server"></h1>

C#

Heading1.InnerText = "Heading";

Simple as that; you can also change its Visibility and CssClass et 8)
e-iceblue support
User avatar

iceblue support
 
Posts: 240
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.Doc