Home How to change aspx html heading from code behind?
Reply: 1

How to change aspx html heading from code behind?

Shrey
1#
Shrey Published in 2017-12-08 01:07:03Z

This is my heading that i want to change from my c# code

 <h3>Please Enter a number between 1 &amp; 
                <asp:Label ID="lbl_max" runat="server"></asp:Label>
            </h3>

I want to replace it with a string

string message = "This is new heading...";

i was thinking about something like this

lbl_max.value = message;

But it's not working... I am absolutely new to asp.net, so forgive me if it's a stupid question...

CodingYoshi
2#
CodingYoshi Reply to 2017-12-08 01:20:37Z

You can do it like this:

this.lbl_max.Text = "This is new heading...";
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.32109 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO