<%@ Page Language="C#" Debug="true" %>
<script runat="server">
void Page_Load()
{
if (Page.IsPostBack) {
DateTime MyDate;
MyDate = Convert.ToDateTime(txtInput.Text);
lblOut.Text = Convert.ToString(MyDate);
}
}
</script>
<html>
<head>
<title>Creating Variables Example</title>
</head>
<body>
<form runat="server">
Please enter a date, such as 10/31/2006
<asp:TextBox runat="server" ID="txtInput">10/31/2006</asp:TextBox><br/>
<asp:Button runat="server" Text="Button"></asp:Button><br/>
Date is:
<asp:Label runat="server" ID="lblOut"/><br/>
</form>
</body>
</html>
|