Reservation Grid(.aspx)
//delete confirm java script
<script language="javascript" type="text/javascript">
function printPartOfPage(elementId) {
var printContent = document.getElementById(elementId);
var windowUrl = 'about:blank';
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
$(function ()
{
$('.myDatePickerClass').datepicker({
controlType: 'select',
timeFormat: 'hh:mm tt'
});
});
</script>
//login view
<asp:LoginView ID="HeadLoginView0" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a ID="HeadLoginStatus1" runat="server" href="~/Login.aspx">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold">
<asp:LoginName ID="HeadLoginName0" runat="server" />
</span>! [
<asp:LoginStatus ID="HeadLoginStatus2" runat="server" LogoutAction="Redirect"
LogoutPageUrl="~/Login.aspx" LogoutText="Log Out" />
]
</LoggedInTemplate>
</asp:LoginView>
// girdview
<asp:GridView ID="grdvwReservation"
DataKeyNames="reservation_id"
runat="server" AutoGenerateColumns="False" CssClass="gridview"
onrowcancelingedit="grdvwReservation_RowCancelingEdit"
onrowediting="grdvwReservation_RowEditing"
onrowupdating="grdvwReservation_RowUpdating"
onrowdatabound="grdvwReservation_RowDataBound"
onselectedindexchanged="grdvwReservation_SelectedIndexChanged"
onrowdeleting="grdvwReservation_RowDeleting">
<Columns>
<asp:TemplateField HeaderText="Reservation_ID">
<ItemTemplate>
<asp:Label ID="lblResId" runat="server" Text='<%# Eval("reservation_id") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtResId" Text='<%# Bind("reservation_id") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Date">
<ItemTemplate>
<asp:Label ID="lblDate" runat="server" Text='<%# Eval("Pickup_Date","{0:MM/dd/yyyy }") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtDate" Text='<%# Bind("Pickup_Date") %>' runat="server" CssClass="myDatePickerClass" ></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtDate"
ErrorMessage="Invalid Format" ForeColor="Red"
ValidationExpression="^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$"
ValidationGroup="val"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="DRIVER">
<ItemTemplate>
<asp:Label ID="lblDriver" runat="server" Text='<%# Eval("Driver_Name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtDriver" Text='<%# Bind("Driver_Name") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PU TIME">
<ItemTemplate>
<asp:Label ID="lblPuTime" runat="server" Text='<%# Eval("Pickup_Date","{0:hh:mm tt}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtPuTime" Text='<%# Bind("Pickup_Date","{0:hh:mm tt}") %>' runat="server" Width="60px"></asp:TextBox>
<asp:RegularExpressionValidator ID="regexpressPuTime" runat="server" ControlToValidate="txtPuTime"
ErrorMessage="Invalid Format" ForeColor="Red"
ValidationExpression="^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$"
ValidationGroup="val"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PROGRESS">
<ItemTemplate>
<asp:Label ID="lblDProgState" runat="server" Text='<%# Eval("Progress_State") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="drpdwnProgState" runat="server" >
<asp:ListItem Value="Pending" Text="Pending"/>
<asp:ListItem Value="Assigned" Text="Assigned"/>
<asp:ListItem Value="Done" Text="Done"/>
<asp:ListItem Value="Cancelled BC" Text="Cancelled BC"/>
<asp:ListItem Value="Cancelled SS" Text="Cancelled SS"/>
<asp:ListItem Value="Postphoned" Text="Postphoned"/>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PHONE NO">
<ItemTemplate>
<asp:Label ID="lblPhoneNo" runat="server" Text='<%# Eval("TelephoneNo") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtPhoneNo" Text='<%# Bind("TelephoneNo") %>' runat="server" Width="90px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FIRST NAME">
<ItemTemplate>
<asp:Label ID="lblFnm" runat="server" Text='<%# Eval("First_Name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtFnm" Text='<%# Bind("First_Name") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="LAST NAME">
<ItemTemplate>
<asp:Label ID="lblLnm" runat="server" Text='<%# Eval("Last_Name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtLnm" Text='<%# Bind("Last_Name") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TRIP">
<ItemTemplate>
<asp:Label ID="lblTrip" runat="server" Text='<%# Eval("Airport_Trip") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtTrip" Text='<%# Bind("Airport_Trip") %>' runat="server"
Width="40px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ADDRESS">
<ItemTemplate>
<asp:Label ID="lblAddress" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtAddress" Text='<%# Bind("Address") %>' runat="server"
Width="350px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FT">
<ItemTemplate>
<asp:Label ID="lblFrTyp" runat="server" Text='<%# Eval("Fare_Type") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="drpdwnFrTyp" runat="server" >
<asp:ListItem Value="DC" Text="DC"/>
<asp:ListItem Value="ppOL" Text="ppOL"/>
<asp:ListItem Value="ppOP" Text="ppOP"/>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FARE">
<ItemTemplate>
<asp:Label ID="lblCost" runat="server" Text='<%# Eval("Cost") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCost" Text='<%# Bind("Cost") %>' runat="server"
Width="45px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtCost" ErrorMessage="*" ForeColor="Red"
ValidationGroup="val"></asp:RequiredFieldValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RT">
<ItemTemplate>
<asp:Label ID="lblRTrp" runat="server" Text='<%# Eval("Round_Trip") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtRTrp" Text='<%# Bind("Round_Trip") %>' runat="server"
Width="50px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TYPE">
<ItemTemplate>
<asp:Label ID="lblTpTyp" runat="server" Text='<%# Eval("Ride_Type") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtTpTyp" Text='<%# Bind("Ride_Type") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="EMAIL">
<ItemTemplate>
<asp:Label ID="lblEmail" runat="server" Text='<%# Eval("Email") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtEmail" Text='<%# Bind("Email") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mls" ItemStyle-Width="10px">
<ItemTemplate>
<asp:Label ID="lblLength" runat="server" Text='<%# Eval("TourLength") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtLength" Text='<%# Bind("TourLength") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemStyle Width="10px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="FLT NO">
<ItemTemplate>
<asp:Label ID="lblFltNo" runat="server" Text='<%# Eval("AirLine_Name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtFltNo" Text='<%# Bind("AirLine_Name") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FLT TIME">
<ItemTemplate>
<asp:Label ID="lblFlTime" runat="server" Text='<%# Eval("AirLine_Time","{0:MM/dd/yyyy hh:mm tt}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtFlTime" Text='<%# Bind("AirLine_Time") %>' runat="server" CssClass="datepickerCompleted" ></asp:TextBox>
<asp:RegularExpressionValidator ID="regexpressFltTime" runat="server" ControlToValidate="txtFlTime"
ErrorMessage="Invalid Format" ForeColor="Red"
ValidationExpression="^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$"
ValidationGroup="val"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CON NO">
<ItemTemplate>
<asp:Label ID="lblResrv" runat="server" Text='<%# Eval("Reservation_No") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtResrv" Text='<%# Bind("Reservation_No") %>' runat="server" Width="100px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:CommandField ValidationGroup="val" ShowEditButton="True" ButtonType="Button" />
<asp:CommandField ShowDeleteButton="True" ButtonType="Button" />
<asp:TemplateField HeaderText="Comments">
<ItemTemplate>
<asp:Label ID="lblCmnts" runat="server" Text='<%# Eval("Comments") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCmnts" Text='<%# Bind("Comments") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
////
http://csharp.net-informations.com/xml/how-to-read-xml.htm
<script language="javascript" type="text/javascript">
function printPartOfPage(elementId) {
var printContent = document.getElementById(elementId);
var windowUrl = 'about:blank';
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
$(function ()
{
$('.myDatePickerClass').datepicker({
controlType: 'select',
timeFormat: 'hh:mm tt'
});
});
</script>
//login view
<asp:LoginView ID="HeadLoginView0" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ <a ID="HeadLoginStatus1" runat="server" href="~/Login.aspx">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold">
<asp:LoginName ID="HeadLoginName0" runat="server" />
</span>! [
<asp:LoginStatus ID="HeadLoginStatus2" runat="server" LogoutAction="Redirect"
LogoutPageUrl="~/Login.aspx" LogoutText="Log Out" />
]
</LoggedInTemplate>
</asp:LoginView>
// girdview
<asp:GridView ID="grdvwReservation"
DataKeyNames="reservation_id"
runat="server" AutoGenerateColumns="False" CssClass="gridview"
onrowcancelingedit="grdvwReservation_RowCancelingEdit"
onrowediting="grdvwReservation_RowEditing"
onrowupdating="grdvwReservation_RowUpdating"
onrowdatabound="grdvwReservation_RowDataBound"
onselectedindexchanged="grdvwReservation_SelectedIndexChanged"
onrowdeleting="grdvwReservation_RowDeleting">
<Columns>
<asp:TemplateField HeaderText="Reservation_ID">
<ItemTemplate>
<asp:Label ID="lblResId" runat="server" Text='<%# Eval("reservation_id") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtResId" Text='<%# Bind("reservation_id") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Date">
<ItemTemplate>
<asp:Label ID="lblDate" runat="server" Text='<%# Eval("Pickup_Date","{0:MM/dd/yyyy }") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtDate" Text='<%# Bind("Pickup_Date") %>' runat="server" CssClass="myDatePickerClass" ></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtDate"
ErrorMessage="Invalid Format" ForeColor="Red"
ValidationExpression="^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$"
ValidationGroup="val"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="DRIVER">
<ItemTemplate>
<asp:Label ID="lblDriver" runat="server" Text='<%# Eval("Driver_Name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtDriver" Text='<%# Bind("Driver_Name") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PU TIME">
<ItemTemplate>
<asp:Label ID="lblPuTime" runat="server" Text='<%# Eval("Pickup_Date","{0:hh:mm tt}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtPuTime" Text='<%# Bind("Pickup_Date","{0:hh:mm tt}") %>' runat="server" Width="60px"></asp:TextBox>
<asp:RegularExpressionValidator ID="regexpressPuTime" runat="server" ControlToValidate="txtPuTime"
ErrorMessage="Invalid Format" ForeColor="Red"
ValidationExpression="^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$"
ValidationGroup="val"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PROGRESS">
<ItemTemplate>
<asp:Label ID="lblDProgState" runat="server" Text='<%# Eval("Progress_State") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="drpdwnProgState" runat="server" >
<asp:ListItem Value="Pending" Text="Pending"/>
<asp:ListItem Value="Assigned" Text="Assigned"/>
<asp:ListItem Value="Done" Text="Done"/>
<asp:ListItem Value="Cancelled BC" Text="Cancelled BC"/>
<asp:ListItem Value="Cancelled SS" Text="Cancelled SS"/>
<asp:ListItem Value="Postphoned" Text="Postphoned"/>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="PHONE NO">
<ItemTemplate>
<asp:Label ID="lblPhoneNo" runat="server" Text='<%# Eval("TelephoneNo") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtPhoneNo" Text='<%# Bind("TelephoneNo") %>' runat="server" Width="90px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FIRST NAME">
<ItemTemplate>
<asp:Label ID="lblFnm" runat="server" Text='<%# Eval("First_Name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtFnm" Text='<%# Bind("First_Name") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="LAST NAME">
<ItemTemplate>
<asp:Label ID="lblLnm" runat="server" Text='<%# Eval("Last_Name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtLnm" Text='<%# Bind("Last_Name") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TRIP">
<ItemTemplate>
<asp:Label ID="lblTrip" runat="server" Text='<%# Eval("Airport_Trip") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtTrip" Text='<%# Bind("Airport_Trip") %>' runat="server"
Width="40px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ADDRESS">
<ItemTemplate>
<asp:Label ID="lblAddress" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtAddress" Text='<%# Bind("Address") %>' runat="server"
Width="350px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FT">
<ItemTemplate>
<asp:Label ID="lblFrTyp" runat="server" Text='<%# Eval("Fare_Type") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="drpdwnFrTyp" runat="server" >
<asp:ListItem Value="DC" Text="DC"/>
<asp:ListItem Value="ppOL" Text="ppOL"/>
<asp:ListItem Value="ppOP" Text="ppOP"/>
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FARE">
<ItemTemplate>
<asp:Label ID="lblCost" runat="server" Text='<%# Eval("Cost") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCost" Text='<%# Bind("Cost") %>' runat="server"
Width="45px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtCost" ErrorMessage="*" ForeColor="Red"
ValidationGroup="val"></asp:RequiredFieldValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RT">
<ItemTemplate>
<asp:Label ID="lblRTrp" runat="server" Text='<%# Eval("Round_Trip") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtRTrp" Text='<%# Bind("Round_Trip") %>' runat="server"
Width="50px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TYPE">
<ItemTemplate>
<asp:Label ID="lblTpTyp" runat="server" Text='<%# Eval("Ride_Type") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtTpTyp" Text='<%# Bind("Ride_Type") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="EMAIL">
<ItemTemplate>
<asp:Label ID="lblEmail" runat="server" Text='<%# Eval("Email") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtEmail" Text='<%# Bind("Email") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mls" ItemStyle-Width="10px">
<ItemTemplate>
<asp:Label ID="lblLength" runat="server" Text='<%# Eval("TourLength") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtLength" Text='<%# Bind("TourLength") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
<ItemStyle Width="10px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="FLT NO">
<ItemTemplate>
<asp:Label ID="lblFltNo" runat="server" Text='<%# Eval("AirLine_Name") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtFltNo" Text='<%# Bind("AirLine_Name") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FLT TIME">
<ItemTemplate>
<asp:Label ID="lblFlTime" runat="server" Text='<%# Eval("AirLine_Time","{0:MM/dd/yyyy hh:mm tt}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtFlTime" Text='<%# Bind("AirLine_Time") %>' runat="server" CssClass="datepickerCompleted" ></asp:TextBox>
<asp:RegularExpressionValidator ID="regexpressFltTime" runat="server" ControlToValidate="txtFlTime"
ErrorMessage="Invalid Format" ForeColor="Red"
ValidationExpression="^(?=\d)(?:(?:(?:(?:(?:0?[13578]|1[02])(\/|-|\.)31)\1|(?:(?:0?[1,3-9]|1[0-2])(\/|-|\.)(?:29|30)\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})|(?:0?2(\/|-|\.)29\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))(\/|-|\.)(?:0?[1-9]|1\d|2[0-8])\4(?:(?:1[6-9]|[2-9]\d)?\d{2}))($|\ (?=\d)))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\ [AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$"
ValidationGroup="val"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="CON NO">
<ItemTemplate>
<asp:Label ID="lblResrv" runat="server" Text='<%# Eval("Reservation_No") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtResrv" Text='<%# Bind("Reservation_No") %>' runat="server" Width="100px"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:CommandField ValidationGroup="val" ShowEditButton="True" ButtonType="Button" />
<asp:CommandField ShowDeleteButton="True" ButtonType="Button" />
<asp:TemplateField HeaderText="Comments">
<ItemTemplate>
<asp:Label ID="lblCmnts" runat="server" Text='<%# Eval("Comments") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtCmnts" Text='<%# Bind("Comments") %>' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
////
http://csharp.net-informations.com/xml/how-to-read-xml.htm
0 comments:
Post a Comment