Below is the code that i have for the contactForm.ascx control. (please note that the name of the file i have is controlform.ascx. that was a typo i had right from the time the file was created and it has worked well till now.)The CSS Class pleasewait cannot be recognized in this control. It has the green squiggly under the class name in VWD. I have added the class to the Monochrome and the DarkGrey CSS and have made sure that the class names match. However it seems that none of the classes in the CSS files are recognized in this control.
Where can i check to see why the CSS is not being referenced in this file?
Thanks in advance!
Code:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlForm.ascx.cs" Inherits="Controls_ControlForm" %>
<style type="text/css">
.style1
{
width: 100%;
}
.style2
{
width: 288px;
}
</style>
<script type = "text/javascript">
function ValidatePhoneNumbers(source, args)
{
var txtPhoneHome = document.getElementById('<%= txtPhoneHome.ClientID %>');
var txtPhoneBusiness = document.getElementById('<%= txtPhoneBusiness.ClientID %>');
if (txtPhoneHome.value != '' || txtPhoneBusiness.value != '')
{
args.IsValid = true;
}
else
{
args.IsValid = false;
}
}
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table class="style1" runat="server" id="FormTable">
<tr>
<td colspan="3">
This is the contact form. Provide your contact information </td>
</tr>
<tr>
<td>
Your Name:</td>
<td class="style2">
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtName" ErrorMessage="Enter your name bro!">* Enter your name bro!</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Your email address</td>
<td class="style2">
<asp:TextBox ID="txtEmailAddress" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtEmailAddress" Display="Dynamic"
ErrorMessage="Please Enter a valid email id ">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="txtEmailAddress" Display="Dynamic"
ErrorMessage="Please enter a valid email id"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
Your email adress again</td>
<td class="style2">
<asp:TextBox ID="txtEmailAddressConfirm" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtEmailAddressConfirm"
ErrorMessage="Please confirm the email id">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="txtEmailAddress" ControlToValidate="txtEmailAddressConfirm"
ErrorMessage="please retype the email id">*</asp:CompareValidator>
</td>
</tr>
<tr>
<td>
Home phone number</td>
<td class="style2">
<asp:TextBox ID="txtPhoneHome" runat="server"></asp:TextBox>
</td>
<td>
<asp:CustomValidator ID="CustomValidator1" runat="server"
ClientValidationFunction="Validate Phone Numbers" Display="Dynamic"
ErrorMessage="Please enter the home or business phone number"
onservervalidate="CustomValidator1_ServerValidate">*</asp:CustomValidator>
</td>
</tr>
<tr>
<td>
Business Phone number</td>
<td class="style2">
<asp:TextBox ID="txtPhoneBusiness" runat="server"></asp:TextBox>
</td>
<td>
</td>
</tr>
<tr>
<td>
Comments</td>
<td class="style2">
<asp:TextBox ID="txtComments" runat="server" Height="106px"
TextMode="MultiLine" Width="315px"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="txtComments" ErrorMessage="Please enter a Comment">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
</td>
<td class="style2">
<asp:Button ID="btnSend1" runat="server" Text="Send" onclick="btnSend1_Click" />
</td>
<td>
</td>
</tr>
<tr>
<td colspan="3">
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</td>
</tr>
</table>
<asp:Label ID="lblMessage" runat="server" Text="Message Sent" Visible="false"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<div class="PleaseWait">
Please Wait...
</div>
</ProgressTemplate>
</asp:UpdateProgress>