Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%@ Page Language="C#" AutoEventWireup="true" Debug="true" CodeFile="Calendar.aspx.cs" Inherits="Calendar" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head runat="server">
<script runat="server">
void ValidateBtn_Click(Object sender, EventArgs e)
{
if (Page.IsValid)
{
lblOutput.Text = "Page is Valid!";
}
else
{
lblOutput.Text = "Page is InValid!";
}
}
</script>
<title>Booking Calendar</title>
</head>
<body>
<form id="form1" runat="server">
<table border="0" width="100%">
<tr>
<td>
<h2>Booking Calendar</h2>
</td>
</tr>
<tr><td><br /></td></tr>
</table>
<asp:Calendar id="calSchedule" Caption="S6 Calendar" Font-Size="Medium" BackColor="AliceBlue" CellSpacing="5" CaptionAlign="Left" OnDayRender="calSchedule_DayRender" Runat="server" />
<br />
<asp:FormView id="frmSchedule" AllowPaging="false" DataSourceID="srcSchedule" Runat="server">
<EmptyDataTemplate>
</EmptyDataTemplate>
<ItemTemplate>
</ItemTemplate>
<%--Insert--%>
<InsertItemTemplate>
<table border="1">
<tr valign="top">
<td colspan="3">
<asp:Label id="lblOutput"
Text="Enter a 5 digit zip code"
Font-Name="Verdana"
Font-Size="10pt"
runat="server"/>
</td>
</tr>
<tr>
<td>
<asp:Label id="lblStartTime" Text="Start Time:" AssociatedControlID="txtStartTime" Runat="server" />
</td>
<td>
<asp:TextBox id="txtStartTime" Text='<%#Bind("StartTime") %>' TextMode="SingleLine" Runat="server" />
</td>
<td><<asp:RegularExpressionValidator id="RegularExpressionValidator1"
ControlToValidate="txtStartTime"
ValidationExpression="\d{5}"
Display="Static"
EnableClientScript="false"
ErrorMessage="Enter must be 5 numeric digits"
runat="server"/></td>
</tr>
<tr>
<td>
<asp:Label id="lblEndTime" Text="End Time:" AssociatedControlID="txtEndTime" Runat="server" />
</td>
<td>
<asp:TextBox id="txtEndTime" Text='<%#Bind("EndTime") %>' TextMode="SingleLine" Runat="server" />
</td>
<td><br /></td>
</tr>
<tr>
<td colspan="3" align="center">
<asp:Button id="btnInsert" Text="Insert" OnClick="ValidateBtn_Click" CommandName="Insert" Runat="server" />
<asp:Button id="btnCancel" Text="Cancel" CausesValidation="false" OnClick="Cancel_OnClick" Runat="server" />
</td>
</tr>
</table>
</InsertItemTemplate>
</asp:FormView>
Label mylabel = (Label)e.item.FindControl("lblOutput");
myLabel.Text = "Your Text Here";