Click here to Skip to main content
15,889,863 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: validation controls Pin
sumit703431-Oct-08 0:24
sumit703431-Oct-08 0:24 
GeneralRe: validation controls Pin
RajeevKumarSharma31-Oct-08 0:33
RajeevKumarSharma31-Oct-08 0:33 
Answer[Message Deleted] Pin
chapidi31-Oct-08 0:30
chapidi31-Oct-08 0:30 
GeneralRe: validation controls Pin
RajeevKumarSharma31-Oct-08 0:35
RajeevKumarSharma31-Oct-08 0:35 
Generalvalidation controls Pin
Amit Agarrwal31-Oct-08 0:41
Amit Agarrwal31-Oct-08 0:41 
GeneralRe: validation controls Pin
RajeevKumarSharma31-Oct-08 0:43
RajeevKumarSharma31-Oct-08 0:43 
GeneralRe: validation controls Pin
meeram39531-Oct-08 1:15
meeram39531-Oct-08 1:15 
GeneralRe: validation controls Pin
RajeevKumarSharma31-Oct-08 1:52
RajeevKumarSharma31-Oct-08 1:52 
<%@ Page Language="C#" EnableEventValidation="false" MasterPageFile="~/Backend/Home.master" AutoEventWireup="true" CodeFile="Backend.aspx.cs" Inherits="Backend_Backend" Title="Untitled Page" %>

<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="cc" %>


<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script language="javascript" type="text/javascript">
function CheckTime(s,e)
{
var ddl1 = document.getElementById('<%=ddl_starttime.ClientID %>');
var ddl2 = document.getElementById('<%=ddl_endtime.ClientID %>');
var selIndex1,selIndex2;
selIndex1 = ddl1.selectedIndex;
selIndex2 = ddl2.selectedIndex;
if(selIndex1 > selIndex2)
{
e.IsValid = false;
}

}
</script>
<div class="container">
<div class="containerin">
<div class="head-a">
<div class="head-txt"><a href="#">Manange My Openhomes</a> > <a href="#">Add a New Openhome</a></div>
</div>
<div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div>
<div class="online">Add a new Openhome</div>
<div class="bot-table">
<div class="row">
<div>Property Location</div>
<div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div>
<div align="center"><table width="60%" cellspacing="7" cellpadding="0" border="0">
<tr>
<td class="row_form" width="10%" valign="top">Street Number</td>
<td align="left" width="50%" valign="top">
<asp:TextBox ID="txtStreetNumber" runat="server" Width="300px"
Font-Names="Tahoma" Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtStreetNumber"
ErrorMessage="Wrong value street Number not entered" ValidationExpression="^\d+$" SetFocusOnError="True" Display="None"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="rfv_streetno" runat="server" ControlToValidate="txtStreetNumber"
ErrorMessage="Street Number not entered" SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please check the following fields " EnableTheming="True" ShowMessageBox="True" />
</td>
</tr>
<tr>
<td class="row_form" width="20%" valign="top">Street Name</td>
<td align="left" width="40%" valign="top">
<asp:TextBox ID="txtStreetName" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfv_streetname" runat="server" ControlToValidate="txtStreetName"
ErrorMessage="Street Name not entered" SetFocusOnError="True" Display="None"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="row_form" width="20%" valign="top">Suburb</td>
<td align="left" width="40%" valign="top">
<asp:TextBox ID="txtSuburb" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Suburb not entered" ControlToValidate="txtSuburb" Display="None"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="row_form"width="20%" valign="top">City</td>
<td align="left" width="40%" valign="top">
<asp:TextBox ID="txtCity" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="City not entered" ControlToValidate="txtCity" Display="None"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td class="row_form" width="20%" valign="top">Postcode</td>
<td align="left" width="40%" valign="top">
<asp:TextBox ID="txtPostcode" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Postcode not entered" ControlToValidate="txtPostcode" Display="None"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtPostcode"
Display="None" ErrorMessage="Wrong value postcode" SetFocusOnError="True" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
</tr>
</table>
</div>
</div>
</div>
<div><img alt="" src="images/spacer.gif" width="1" height="10px" /></div>
<div class="bot-table">
<div class="row">
<div>Property Details </div>
<div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div>
<div align="center"><table width="60%" cellspacing="7" cellpadding="0" border="0">
<tr>
<td class="row_form" width="10%" valign="top">Price (optional)</td>
<td align="left" width="50%" valign="top">
<asp:TextBox ID="txtPrice" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox></td>
</tr>
<tr>
<td class="row_form" width="20%" valign="top">Bedrooms</td>
<td align="left" width="40%" valign="top">
<asp:TextBox ID="txtBedrooms" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="No. of bedrooms not entered" ControlToValidate="txtBedrooms" Display="None"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtBedrooms"
Display="None" ErrorMessage="Wrong value no. of bedrooms" SetFocusOnError="True" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td class="row_form" width="20%" valign="top" style="height: 45px">Bathrooms</td>
<td align="left" width="40%" valign="top" style="height: 45px">
<asp:TextBox ID="txtBathrooms" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="No. of bathrooms not entered" ControlToValidate="txtBathrooms" Display="None"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtBathrooms"
Display="None" ErrorMessage="Wrong value no. of bathrooms" SetFocusOnError="True" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td class="row_form"width="20%" valign="top" style="height: 63px">Parking</td>
<td align="left" width="40%" valign="top" style="height: 63px">
<asp:TextBox ID="txtParking" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="No. of parking not entered" ControlToValidate="txtParking" Display="None"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtParking"
Display="None" ErrorMessage="Wrong value no. of parking" SetFocusOnError="True" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td class="row_form" width="20%" valign="top" style="height: 27px">Url</td>
<td align="left" width="40%" valign="top" style="height: 27px">
<asp:TextBox ID="txtUrl" runat="server" Width="300px" Font-Names="Tahoma"
Font-Size="16px" ForeColor="#919295" BorderStyle="Solid"
BorderColor="#aaaaaa"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Url not entered" ControlToValidate="txtUrl" Display="None"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" Display="None"
ErrorMessage="Wrong Url" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?" ControlToValidate="txtUrl" SetFocusOnError="True"></asp:RegularExpressionValidator></td>
</tr>
<tr>
<td class="row_form">Image (optional)</td>
<td class="row_form">
<asp:FileUpload ID="flupdImg" runat="server" BackColor="Black" BorderColor="Black" BorderStyle="Solid" BorderWidth="0px" Width="1px" />
</td>
</tr>
</table>
</div>
</div>
</div>
<div><img alt="" src="images/spacer.gif" width="1" height="10px" /></div>

<div class="bot-table">
<div class="row">
<div>Openhome Information </div>
<div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div>
<div align="center"><table width="60%" cellspacing="7" cellpadding="0" border="0">
<tr>
<td class="row_form" width="10%" valign="top">Day</td>
<td align="left" width="50%" valign="top">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
&nbsp;

&nbsp;<asp:DropDownList ID="ddl_day" runat="server" OnSelectedIndexChanged="ddl_day_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="0">Day</asp:ListItem>
<asp:ListItem>Monday</asp:ListItem>
<asp:ListItem>Tuesday</asp:ListItem>
<asp:ListItem>Wednesday</asp:ListItem>
<asp:ListItem>Thursday</asp:ListItem>
<asp:ListItem>Friday</asp:ListItem>
<asp:ListItem>Saturday</asp:ListItem>
<asp:ListItem>Sunday</asp:ListItem>
</asp:DropDownList>
&nbsp;<asp:DropDownList ID="ddl_date" runat="server" OnSelectedIndexChanged="ddl_date_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="0">Date</asp:ListItem>
<asp:ListItem Value="1">1st</asp:ListItem>
<asp:ListItem Value="2">2nd</asp:ListItem>
<asp:ListItem Value="3">3rd</asp:ListItem>
<asp:ListItem Value="4">4th</asp:ListItem>
<asp:ListItem Value="5">5th</asp:ListItem>
<asp:ListItem Value="6">6th</asp:ListItem>
<asp:ListItem Value="7">7th</asp:ListItem>
<asp:ListItem Value="8">8th</asp:ListItem>
<asp:ListItem Value="9">9th</asp:ListItem>
<asp:ListItem Value="10">10th</asp:ListItem>
<asp:ListItem Value="11">11th</asp:ListItem>
<asp:ListItem Value="12">12th</asp:ListItem>
<asp:ListItem Value="13">13th</asp:ListItem>
<asp:ListItem Value="14">14th</asp:ListItem>
<asp:ListItem Value="15">15th</asp:ListItem>
<asp:ListItem Value="16">16th</asp:ListItem>
<asp:ListItem Value="17">17th</asp:ListItem>
<asp:ListItem Value="18">18th</asp:ListItem>
<asp:ListItem Value="19">19th</asp:ListItem>
<asp:ListItem Value="20">20th</asp:ListItem>
<asp:ListItem Value="21">21st</asp:ListItem>
<asp:ListItem Value="22">22nd</asp:ListItem>
<asp:ListItem Value="23">23rd</asp:ListItem>
<asp:ListItem Value="24">24th</asp:ListItem>
<asp:ListItem Value="25">25th</asp:ListItem>
<asp:ListItem Value="26">26th</asp:ListItem>
<asp:ListItem Value="27">27th</asp:ListItem>
<asp:ListItem Value="28">28th</asp:ListItem>
<asp:ListItem Value="29">29th</asp:ListItem>
<asp:ListItem Value="30">30th</asp:ListItem>
<asp:ListItem Value="31">31st</asp:ListItem>
</asp:DropDownList>
&nbsp;<asp:DropDownList ID="ddl_month" runat="server" OnSelectedIndexChanged="ddl_month_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="0">Month</asp:ListItem>
<asp:ListItem Value="1">January</asp:ListItem>
<asp:ListItem Value="2">February</asp:ListItem>
<asp:ListItem Value="3">March</asp:ListItem>
<asp:ListItem Value="4">April</asp:ListItem>
<asp:ListItem Value="5">May</asp:ListItem>
<asp:ListItem Value="6">June</asp:ListItem>
<asp:ListItem Value="7">July</asp:ListItem>
<asp:ListItem Value="8">August</asp:ListItem>
<asp:ListItem Value="9">September</asp:ListItem>
<asp:ListItem Value="10">October</asp:ListItem>
<asp:ListItem Value="11">November</asp:ListItem>
<asp:ListItem Value="12">December</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td class="row_form" width="20%" valign="top">Time Starts </td>
<td align="left" width="40%" class="row_form" valign="top">
&nbsp; &nbsp;<asp:DropDownList ID="ddl_starttime" runat="server">
<%-- <asp:ListItem>00.00</asp:ListItem>
<asp:ListItem>01.00</asp:ListItem>

<asp:ListItem>02.00</asp:ListItem>

<asp:ListItem>03.00</asp:ListItem>

<asp:ListItem>04.00</asp:ListItem>

<asp:ListItem>05.00</asp:ListItem>

<asp:ListItem>06.00</asp:ListItem>

<asp:ListItem>07.00</asp:ListItem>

<asp:ListItem>08.00</asp:ListItem>

<asp:ListItem>09.00</asp:ListItem>

<asp:ListItem>10.00</asp:ListItem>

<asp:ListItem>11.00</asp:ListItem>

<asp:ListItem>12.00</asp:ListItem>

<asp:ListItem>13.00</asp:ListItem>

<asp:ListItem>14.00</asp:ListItem>

<asp:ListItem>15.00</asp:ListItem>

<asp:ListItem>16.00</asp:ListItem>

<asp:ListItem>17.00</asp:ListItem>

<asp:ListItem>18.00</asp:ListItem>

<asp:ListItem>19.00</asp:ListItem>

<asp:ListItem>20.00</asp:ListItem>

<asp:ListItem>21.00</asp:ListItem>

<asp:ListItem>22.00</asp:ListItem>

<asp:ListItem>23.00</asp:ListItem>--%>

</asp:DropDownList>Time ends&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:DropDownList ID="ddl_endtime" runat="server">
<%--<asp:ListItem>00.00</asp:ListItem>

<asp:ListItem>01.00</asp:ListItem>

<asp:ListItem>02.00</asp:ListItem>

<asp:ListItem>03.00</asp:ListItem>

<asp:ListItem>04.00</asp:ListItem>

<asp:ListItem>05.00</asp:ListItem>

<asp:ListItem>06.00</asp:ListItem>

<asp:ListItem>07.00</asp:ListItem>

<asp:ListItem>08.00</asp:ListItem>

<asp:ListItem>09.00</asp:ListItem>

<asp:ListItem>10.00</asp:ListItem>

<asp:ListItem>11.00</asp:ListItem>

<asp:ListItem>12.00</asp:ListItem>

<asp:ListItem>13.00</asp:ListItem>

<asp:ListItem>14.00</asp:ListItem>

<asp:ListItem>15.00</asp:ListItem>

<asp:ListItem>16.00</asp:ListItem>

<asp:ListItem>17.00</asp:ListItem>

<asp:ListItem>18.00</asp:ListItem>

<asp:ListItem>19.00</asp:ListItem>

<asp:ListItem>20.00</asp:ListItem>

<asp:ListItem>21.00</asp:ListItem>

<asp:ListItem>22.00</asp:ListItem>

<asp:ListItem>23.00</asp:ListItem>--%>

</asp:DropDownList></td>
</tr>
</table>
</div>
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="ddl_month"
ErrorMessage="Select Month" InitialValue="0" SetFocusOnError="True" Display="None">Select Month</asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="ddl_date"
ErrorMessage="Select Date" InitialValue="0" SetFocusOnError="True" Display="None">Select Date</asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="ddl_day"
ErrorMessage="Select Day" InitialValue="0" SetFocusOnError="True" Display="None">Select Day</asp:RequiredFieldValidator>
<asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="CheckTime"
ErrorMessage="Time Starts must be less than Time ends" Display="None" EnableViewState="False"></asp:CustomValidator></div>
</div>

<div><img alt="" src="images/spacer.gif" width="1" height="10px" /></div>
<div align="right" class="preview">
&nbsp;</div>

<div class="bot-table">
<div id="statusdiv" class="row" runat="server" visible="false">
<div>Status</div>
<div><img alt="" src="images/spacer.gif" height="5px" border="0" /></div>
<div align="center"><table width="60%" cellspacing="7" cellpadding="0" border="0">
<tr>
<td colspan="2" valign="top" class="row_form" style="height: 20px">
<asp:RadioButtonList ID="rdolist" runat="server">
<asp:ListItem Value="Online" Text="Online (Viewable at www.openhomesplanner.com)"></asp:ListItem>
<asp:ListItem Value="Offline" Text="Offline (Saved in drafts list)"></asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator id="ServiceTypesCheck"
ControlToValidate="rdolist"
runat="server" Display="None" ErrorMessage="You Must Choose Status" SetFocusOnError="True"/>
</td>
</tr>
</table>
</div>
</div>
<div><img alt="" src="images/spacer.gif" width="1" height="20px" /></div>
<div align="center"><asp:ImageButton runat="server" id="img_save" ImageUrl="images/save.jpg" OnClick="img_save_Click"/>
<asp:ImageButton ID="btnPreview" runat="server" ImageUrl="images/preview.jpg"
Height="41" BorderWidth="0" onclick="btnPreview_Click" />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /></div>
<div><img alt="" src="images/spacer.gif" width="1" height="20px" /></div>
<div align="right" class="preview">
&nbsp;</div>
<div><img alt="" src="images/spacer.gif" width="1" height="10px" /></div>
<%--<div><img alt="" src="images/spacer.gif" height="10px" border="0" /></div>
<asp:ImageButton ID="btnPreview" runat="server" ImageUrl="images/preview.jpg"
Height="41" BorderWidth="0" onclick="btnPreview_Click" />--%>
</div>
<div><img alt="" src="images/spacer.gif" width="1" height="10px" /></div>
</div>
</div>
</asp:Content>

Rajeev Kr. Sharma
InfoFace Technologies Pvt. Ltd.

GeneralRe: validation controls Pin
Krazy Programmer31-Oct-08 2:49
Krazy Programmer31-Oct-08 2:49 
QuestionHow to validate user using Active directory Pin
kedarrkulkarni30-Oct-08 22:42
kedarrkulkarni30-Oct-08 22:42 
Questiondatagrid column index Pin
saravanan0530-Oct-08 21:37
saravanan0530-Oct-08 21:37 
AnswerRe: datagrid column index Pin
Sathesh Sakthivel30-Oct-08 23:12
Sathesh Sakthivel30-Oct-08 23:12 
QuestionHow to get Text and Id with autocomplete textbox using ajaxtoolkit Pin
Jagz W30-Oct-08 21:35
professionalJagz W30-Oct-08 21:35 
QuestionMaster Page problem Pin
raghvendrapanda30-Oct-08 21:30
raghvendrapanda30-Oct-08 21:30 
QuestionRe: Master Page problem Pin
Krazy Programmer31-Oct-08 0:00
Krazy Programmer31-Oct-08 0:00 
AnswerRe: Master Page problem Pin
Amit Agarrwal31-Oct-08 0:45
Amit Agarrwal31-Oct-08 0:45 
QuestionIP Tracking Pin
Member 227733430-Oct-08 20:55
Member 227733430-Oct-08 20:55 
QuestionObject Reference Error please guide! Pin
mr_muskurahat30-Oct-08 20:40
mr_muskurahat30-Oct-08 20:40 
AnswerRe: Object Reference Error please guide! Pin
Kannan Ar30-Oct-08 22:58
professionalKannan Ar30-Oct-08 22:58 
GeneralRe: Object Reference Error please guide! Pin
mr_muskurahat30-Oct-08 23:04
mr_muskurahat30-Oct-08 23:04 
QuestionHow to import mails?? Pin
Dotnetkanna30-Oct-08 20:21
Dotnetkanna30-Oct-08 20:21 
AnswerRe: How to import mails?? Pin
Kannan Ar30-Oct-08 22:31
professionalKannan Ar30-Oct-08 22:31 
GeneralRe: How to import mails?? Pin
Dotnetkanna30-Oct-08 22:41
Dotnetkanna30-Oct-08 22:41 
GeneralRe: How to import mails?? Pin
Kannan Ar30-Oct-08 22:51
professionalKannan Ar30-Oct-08 22:51 
AnswerRe: How to import mails?? Pin
Ashfield30-Oct-08 22:31
Ashfield30-Oct-08 22:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.