Label Example: how to generate text in Page_Load event
Page_LoadLabelControl.aspx
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, System.EventArgs e) {
Label1.Text = "This text generated by Page_Load event";
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Label Example: how to generate text in Page_Load event</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style=" color:Olive">Page_Load Event and Label</h2>
<asp:Label ID="Label1" runat="server" Font-Size="Large" ForeColor="DarkOrange"></asp:Label>
</div>
</form>
</body>
</html>
- asp.net Button example: how to use OnClientClick event
- asp.net class file example: how to use class, method, argument in asp.net
- Asp.Net PlaceHolder example: how to add control programmatically
- Asp.Net PlaceHolder example: how to use PlaceHolder Control
- Asp.Net BulletedList example: how to use DisplayMode LinkButton
- asp:Label example: using Label control in asp.net
- Label control example: how to design Label control in asp.net
- Label Example: Using AssociatedControlID property in asp.net
- Label Example: Using AccessKey property in Label control
- How to get ConnectionStrings list programmatically in asp.net