<%@ Page Language="C#" Debug="true" %>
<script runat="server">
void Page_Load()
{
lblMessage.Text = "First Line";
InsertLinebreak();
lblMessage.Text += "Second Line";
InsertLinebreak();
lblMessage.Text += "Third Line";
InsertLinebreak();
}
void InsertLinebreak()
{
lblMessage.Text += "<br><hr>";
}
</script>
<html>
<head>
<title>Simple Function Example</title>
</head>
<body>
<form runat="server">
<asp:Label id="lblMessage" runat="server"></asp:Label>
</form>
</body>
</html>
|