Question

gridview does not display

Asked by: -Dman100-

I cannot figure out why my gridview is not displaying.  I've tried to debug, but the button event that populates the gridview does not seem to be getting executed.  yet, when the page flickers it looks like I can see the gridview momentarily and it looks to be getting populated.  I'm not getting any errors.

I'm using a ModalPopupExtender.

See my code below.

Thanks for any help.

user control UI code:
 
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SiteAssessmentChecklistForm.ascx.cs" Inherits="Controls_SiteAssessmentChecklistForm" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<style type="text/css">
    .modalBackground {
        background-color:Gray;
        filter:alpha(opacity=70);
        opacity:0.7;
     }
     .modalPopup {
        background-color:#ffffdd;
        border-width:3px;
        border-style:solid;
        border-color:Gray;
        padding:3px;
        width:800px;
     }
</style>
 
<div id="contactForm" runat="server" class="contact-icg-form">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>  
    
    
    <fieldset>
        <legend><asp:Literal ID="lblTitle" runat="server"></asp:Literal></legend>
        
            <p id="msgSuccess" runat="server" visible="false">
            Thank you.  Your information has been successfully processed.
            </p>
            
            <asp:Panel ID="pnlHideFields" runat="server">
            <p>
            The following information will allow CompassLearning Technical Services to evaluate your network
            infrastructure and make a recommendation on whether additional hardware is required to effectively 
            run Odyssey Hardware. 
            </p>
            
            <p><span class="required"><strong>NOTE:</strong> All fields are required.</span></p>
            
            <!-- Primary Site Information ........................................ -->
            <h3>Primary Site Information</h3>
 
            <!-- Site Name ...................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrSiteName" 
                runat="server" 
                ControlToValidate="txtSiteName"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Site Name:</span>"></asp:RequiredFieldValidator>            
            <span><label for="sitename" id="lblSiteName" runat="server">Site Name:</label></span>
            <asp:TextBox ID="txtSiteName" runat="server"></asp:TextBox>
            
            <!-- Address .......................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrAddress" 
                runat="server" 
                ControlToValidate="txtAddress"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Address:</span>"></asp:RequiredFieldValidator>            
            <span><label for="address" id="lblAddress" runat="server">Address:</label></span>
            <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
            
            <!-- City ............................................................ -->
            <asp:RequiredFieldValidator 
                ID="valrCity" 
                runat="server" 
                ControlToValidate="txtCity"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>City:</span>"></asp:RequiredFieldValidator>            
            <span><label for="city" id="lblCity" runat="server">City:</label></span>
            <asp:TextBox ID="txtCity" runat="server"></asp:TextBox>
            
            <!-- State ........................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrState" 
                runat="server" 
                ControlToValidate="ddlState"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>State:</span>"></asp:RequiredFieldValidator>            
            <span><label for="state" id="lblState" runat="server">State:</label></span>
            <asp:DropDownList 
		        ID="ddlState" 
		        runat="server" 
		        AppendDataBoundItems="true"
		        DataSourceID="StatesDataSource" 
		        DataTextField="Name" 
		        DataValueField="StateAbr">                
		    <asp:ListItem Selected="True" Value="">Please select...</asp:ListItem>
            </asp:DropDownList>
            
            <!-- Zip ............................................................. -->
            <asp:RequiredFieldValidator 
                ID="valrZip" 
                runat="server" 
                ControlToValidate="txtZip"
                Display="Dynamic" 
                EnableClientScript="False" 
                Enabled="False" 
                ErrorMessage="<span class='alert'>Zip:</span>"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator 
                ID="valeZip" 
                runat="server"
                ControlToValidate="txtZip" 
                Display="Dynamic" 
                EnableClientScript="False" 
                Enabled="False"
                ErrorMessage="<span class='alert'>Zip:</span>" 
                ValidationExpression="\d{5}(-\d{4})?"></asp:RegularExpressionValidator>           
                <span><label for="zip" id="lblZip" runat="server">Zip:</label></span>
                <asp:TextBox ID="txtZip" runat="server" MaxLength="5" Width="50px"></asp:TextBox>
            
            <!-- Site Description ................................................. -->
            <asp:RequiredFieldValidator 
                ID="valrSiteDescription" 
                runat="server" 
                ControlToValidate="ddlSiteDescription"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Site Description:</span>"></asp:RequiredFieldValidator>
            <span><label for="sitedescription" id="lblSiteDescription" runat="server">Site Description:</label></span>      
            <asp:DropDownList ID="ddlSiteDescription" runat="server">                
		        <asp:ListItem Selected="True" Value="">Please select...</asp:ListItem>
                <asp:ListItem value="School">School</asp:ListItem>
                <asp:ListItem value="District Office">District Office</asp:ListItem>
                <asp:ListItem value="Other">Other</asp:ListItem>
            </asp:DropDownList> 
            
            <div style="clear:both;"></div>
            
            <!-- Specify Other Site Description ................................... -->           
            <span><label for="specifyothersitedescription" id="lblSpecifyOtherSiteDescription" runat="server">If other, specify:</label></span>
            <asp:TextBox ID="txtSpecifyOtherSiteDescription" runat="server"></asp:TextBox>
                
            <!-- Contact Information .............................................. -->
            <h3>Primary Contact Information</h3>
                
            <!-- Contact Name ..................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrContactName" 
                runat="server" 
                ControlToValidate="txtContactName"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Full Name:</span>"></asp:RequiredFieldValidator>            
            <span><label for="contactname" id="lblContactName" runat="server">Full Name:</label></span>
            <asp:TextBox ID="txtContactName" runat="server"></asp:TextBox>
            
            <!-- Contact Phone Number .............................................. -->
            <asp:CustomValidator 
                ID="valxContactPhoneNumber" 
                runat="server" 
                EnableClientScript="false"
                SetFocusOnError="true" 
                ErrorMessage="<span class='alert'>Phone Number:</span>"
                Display="dynamic" OnServerValidate="valxContactPhoneNumber_ServerValidate" Enabled="False" ForeColor=""></asp:CustomValidator>	
            <span><label for="contactphonenumber" id="lblContactPhoneNumber" runat="server">Phone Number:</label></span>
            <asp:TextBox 
                ID="contactphoneAreacode" 
                runat="server" 
                TextMode="SingleLine" 
                MaxLength="3"
                ToolTip="Phone Number Area Code" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="contactphonePrefix" 
                runat="server"
                MaxLength="3" 
                TextMode="SingleLine" 
                ToolTip="Phone Number Prefix" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="contactphoneSuffix" 
                runat="server"
                MaxLength="4" 
                TextMode="SingleLine" 
                ToolTip="Phone Number Suffix" Width="30px" CssClass="phone"></asp:TextBox>
                
            <!-- Contact Alternate Number ............................................... -->
            <div> 
            <span><label for="contactalternatenumber" id="lblContactAlternateNumber" runat="server">Alternate Number:</label></span>
            <asp:TextBox 
                ID="contactAlternateAreacode" 
                runat="server" 
                TextMode="SingleLine" 
                MaxLength="3"
                ToolTip="Alternate Number Area Code" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="contactAlternatePrefix" 
                runat="server"
                MaxLength="3" 
                TextMode="SingleLine" 
                ToolTip="Alternate Number Prefix" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="contactAlternateSuffix" 
                runat="server"
                MaxLength="4" 
                TextMode="SingleLine" 
                ToolTip="Alternate Number Suffix" Width="30px" CssClass="phone"></asp:TextBox>
            </div>
            
            <!-- Contact Email .................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrContactEmail" 
                runat="server" 
                ControlToValidate="contactEmail"
                EnableClientScript="false"
                SetFocusOnError="true" 
                ErrorMessage="<span class='alert'>Email:</span>"
                Display="dynamic" 
                Enabled="False" ForeColor=""></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator 
                ID="valeContactEmail" 
                runat="server"
                ControlToValidate="contactEmail"
                EnableClientScript="false"
                SetFocusOnError="true"
                ErrorMessage="<span class='alert'>Email:</span>"
                Display="dynamic" 
                Enabled="False" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ForeColor=""></asp:RegularExpressionValidator>
            <span><label for="contactemail" id="lblContactEmail" runat="server">Email:</label></span>
            <asp:TextBox 
                ID="contactEmail" 
                runat="server" 
                TextMode="SingleLine" 
                ToolTip="Contact Email Address"></asp:TextBox>
            
            <!-- CompassLearning Contact ......................................... -->
            <asp:RequiredFieldValidator 
                ID="valrCompassLearningContact" 
                runat="server" 
                ControlToValidate="txtCompassLearningContact"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>CompassLearning Contact:</span>"></asp:RequiredFieldValidator>            
            <span><label for="compasslearningcontact" id="lblCompassLearningContact" runat="server">CompassLearning Contact:</label></span>
            <asp:TextBox ID="txtCompassLearningContact" runat="server"></asp:TextBox>
            
            
            <!-- Technical Contact Section ....................................... -->
            <h3>Technical Contact</h3>
            
            <span><label for="duplicatecontactinfo" id="lblDuplicateContactInfo" runat="server">Please check if same as administrative contact.</label></span>
            <asp:CheckBox ID="cbDuplicateContactInfo" runat="server" CssClass="checkbox-list" AutoPostBack="True" OnCheckedChanged="cbDuplicateContactInfo_CheckedChanged" />
            
            <div style="clear:both;"></div>
            
            <asp:Panel ID="pnlTechContact" runat="server">
            <!-- Technical Contact Name .......................................... -->          
            <span><label for="contactname" id="Label1" runat="server">Full Name:</label></span>
            <asp:TextBox ID="txtTechContactName" runat="server"></asp:TextBox>
            
            <!-- Technical Contact Phone Number .................................. -->
            <span><label for="contactphonenumber" id="Label3" runat="server">Phone Number:</label></span>
            <asp:TextBox 
                ID="techcontactphoneAreacode" 
                runat="server" 
                TextMode="SingleLine" 
                MaxLength="3"
                ToolTip="Technical Contact Phone Number Area Code" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="techcontactphonePrefix" 
                runat="server"
                MaxLength="3" 
                TextMode="SingleLine" 
                ToolTip="Technical Contact Phone Number Prefix" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="techcontactphoneSuffix" 
                runat="server"
                MaxLength="4" 
                TextMode="SingleLine" 
                ToolTip="Technical Contact Phone Number Suffix" Width="30px" CssClass="phone"></asp:TextBox>
                
            <!-- Technical Contact Alternate Number ................................ -->
            <div>
            <span><label for="contactalternatenumber" id="Label4" runat="server">Alternate Number:</label></span>
            <asp:TextBox 
                ID="techcontactAlternateAreacode" 
                runat="server" 
                TextMode="SingleLine" 
                MaxLength="3"
                ToolTip="Technical Alternate Number Area Code" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="techcontactAlternatePrefix" 
                runat="server"
                MaxLength="3" 
                TextMode="SingleLine" 
                ToolTip="Technical Alternate Number Prefix" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="techcontactAlternateSuffix" 
                runat="server"
                MaxLength="4" 
                TextMode="SingleLine" 
                ToolTip="Technical Alternate Number Suffix" Width="30px" CssClass="phone"></asp:TextBox>
            </div>
            
            <!-- Technical Contact Email ........................................... -->
                <asp:RegularExpressionValidator 
                ID="valxTechContactEmail" 
                runat="server"
                ControlToValidate="txtTechContactEmail"
                EnableClientScript="false"
                SetFocusOnError="true"
                ErrorMessage="<span class='alert'>Email:</span>"
                Display="dynamic" 
                Enabled="False" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ForeColor=""></asp:RegularExpressionValidator>
            <span><label for="techcontactemail" id="lblTechContactEmail" runat="server">Email:</label></span>
            <asp:TextBox 
                ID="txtTechContactEmail" 
                runat="server" 
                TextMode="SingleLine" 
                ToolTip="Technical Contact Email Address"></asp:TextBox>
            </asp:Panel>
            
            <!-- Site Information ................................................ -->
            <h3>Site Information</h3>
            
        
            <asp:Button runat="server" ID="btnAddSiteInfo" Text="Add Site" Width="100px" OnClick="btnAddSiteInfo_Click" />
            <asp:Panel runat="server" ID="pnlSiteInfo">
            <asp:GridView runat="server" ID="gvSiteInfo" Width="750" OnRowCreated="gvSiteInfo_RowCreated" >
                <RowStyle Font-Size="1.2em" />
                <HeaderStyle Font-Size="1.2em" ForeColor="#002F68" />
            </asp:GridView>
            </asp:Panel>
            
            <asp:Panel runat="server" ID="pnlAddSiteInfo" CssClass="modalPopup" style="display: none;">
            <!-- ISP Connection Speed ............................................ -->
               <asp:RequiredFieldValidator 
                ID="valrISPConnectionSpeed" 
                runat="server" 
                ControlToValidate="txtISPConnectionSpeed"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the ISP (Internet) Connection Speed?</span>"></asp:RequiredFieldValidator>            
            <span><label for="ispconnectionspeed" id="lblISPConnectionSpeed" runat="server">What is the ISP (Internet) Connection Speed?</label></span>
            <asp:TextBox ID="txtISPConnectionSpeed" runat="server"></asp:TextBox>
            
            <!-- WAN Connection Speed ............................................ -->
               <asp:RequiredFieldValidator 
                ID="valrWANConnectionSpeed" 
                runat="server" 
                ControlToValidate="txtWANConnectionSpeed"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the WAN (District) Connection Speed?</span>"></asp:RequiredFieldValidator>            
            <span><label for="wanconnectionspeed" id="lblWANConnectionSpeed" runat="server">What is the WAN (District) Connection Speed?</label></span>
            <asp:TextBox ID="txtWANConnectionSpeed" runat="server"></asp:TextBox>
            
            <!-- LAN Connection Speed ............................................ -->
               <asp:RequiredFieldValidator 
                ID="valrLANConnectionSpeed" 
                runat="server" 
                ControlToValidate="txtLANConnectionSpeed"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the LAN (Internal) Connection Speed?</span>"></asp:RequiredFieldValidator>            
            <span><label for="lanconnectionspeed" id="lblLANConnectionSpeed" runat="server">What is the LAN (Internal) Connection Speed?</label></span>
            <asp:TextBox ID="txtLANConnectionSpeed" runat="server"></asp:TextBox>
            
            <!-- Wireless Connection .................................................. -->
            <asp:RequiredFieldValidator
                ID="valrWirelessConnection"
                runat="server"
                ControlToValidate="rbnWirelessConnection"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Do the workstations connect wirelessly?</span>"></asp:RequiredFieldValidator>
            <span><label for="wirelessconnection" id="lblWirelessConnection" runat="server">Do the workstations connect wirelessly?</label></span>
            <asp:RadioButtonList id="rbnWirelessConnection" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
            
            <div style="clear:both;"></div>
            
            <!-- Direct Connection ............................................... -->
            <asp:RequiredFieldValidator
                ID="valrDirectConnection"
                runat="server"
                ControlToValidate="rbnDirectConnection"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Is there a direct connection to the ISP?</span>"></asp:RequiredFieldValidator>
            <span><label for="directconnection" id="lblDirectConnection" runat="server">Is there a direct connection to the ISP?</label></span>
            <asp:RadioButtonList id="rbnDirectConnection" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
            
            <div style="clear:both;"></div>
            
            <!-- Total Cuncurrent Users ......................................... -->
               <asp:RequiredFieldValidator 
                ID="valrTotalConcurrentUsers" 
                runat="server" 
                ControlToValidate="txtTotalConcurrentUsers"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the total number of concurrent users on-site?</span>"></asp:RequiredFieldValidator>            
            <span><label for="totalconcurrentusers" id="lblTotalConcurrentUsers" runat="server">What is the total number of concurrent users on-site?</label></span>
            <asp:TextBox ID="txtTotalConcurrentUsers" runat="server"></asp:TextBox>
            
            <!-- K8 Cuncurrent Users ......................................... -->
               <asp:RequiredFieldValidator 
                ID="valrK8ConcurrentUsers" 
                runat="server" 
                ControlToValidate="txtK8ConcurrentUsers"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the number of K-8 concurrent users?</span>"></asp:RequiredFieldValidator>            
            <span><label for="k8concurrentusers" id="lblK8ConcurrentUsers" runat="server">What is the number of K-8 concurrent users?</label></span>
            <asp:TextBox ID="txtK8ConcurrentUsers" runat="server"></asp:TextBox>
            
            <!-- HS/AP Cuncurrent Users ......................................... -->
               <asp:RequiredFieldValidator 
                ID="valrHSAPConcurrentUsers" 
                runat="server" 
                ControlToValidate="txtHSAPConcurrentUsers"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the number of HS/AP concurrent users?</span>"></asp:RequiredFieldValidator>            
            <span><label for="HSAPConcurrentUsers" id="lblHSAPConcurrentUsers" runat="server">What is the number of HS/AP concurrent users?</label></span>
            <asp:TextBox ID="txtHSAPConcurrentUsers" runat="server"></asp:TextBox>
            
            
            <!-- Caching Server ................................................. -->
            <asp:RequiredFieldValidator 
                ID="valrCachingServer" 
                runat="server" 
                ControlToValidate="rbnCachingServer"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Is there a caching server at the site?</span>"></asp:RequiredFieldValidator>
            <span><label for="cachingserver" id="lblCachingServer" runat="server">Is there a caching server at the site?</label></span>      
            <asp:RadioButtonList id="rbnCachingServer" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList> 
 
            <div style="clear:both;"></div>
            
            <asp:Button ID="btnAdd" runat="server" Text="Add" Width="100px" OnClick="btnAdd_Click" />
            <asp:Button ID="btnClose" runat="server" Width="100px" Text="Close Window" />
            
            </asp:Panel>
            
             
            <!-- Bandwidth Utilization ........................................... -->
            <asp:RequiredFieldValidator
                ID="valrBandwidthUtilization"
                runat="server"
                ControlToValidate="rbnBandwidthUtilization"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Do you have or can you obtain information on bandwidth utilization?</span>"></asp:RequiredFieldValidator>
            <span><label for="bandwidthutilization" id="lblBandwidthUtilization" runat="server">Do you have or can you obtain information on bandwidth utilization?</label></span>
            <asp:RadioButtonList id="rbnBandwidthUtilization" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList> 
            
            <div style="clear:both;"></div>
            
            <!-- Network Diagram ................................................. -->
            <asp:RequiredFieldValidator
                ID="valrNetworkDiagram"
                runat="server"
                ControlToValidate="rbnNetworkDiagram"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Do you have a network diagram you can provide to CompassLearning?</span>"></asp:RequiredFieldValidator>
            <span><label for="networkdiagram" id="lblNetworkDiagram" runat="server">Do you have a network diagram you can provide to CompassLearning?</label></span>
            <asp:RadioButtonList id="rbnNetworkDiagram" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
            
            <div style="clear:both;"></div>
            
            <!-- Server Requirements ............................................... -->
            <asp:RequiredFieldValidator
                ID="valrServerRequirements"
                runat="server"
                ControlToValidate="rbnServerRequirements"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Would you like a TS Specialist to discuss server requirements with you?</span>"></asp:RequiredFieldValidator>
            <span><label for="serverrequirements" id="lblServerRequirements" runat="server">Would you like a TS Specialist to discuss server requirements with you?</label></span>
            <asp:RadioButtonList id="rbnServerRequirements" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
            
            <div style="clear:both;"></div>         
            
            <!-- Workstation Requirements ............................................ -->
            <asp:RequiredFieldValidator
                ID="valrWorkstationRequirements"
                runat="server"
                ControlToValidate="rbnWorkstationRequirements"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Would you like a TS Specialist to discuss workstation requirements with you?</span>"></asp:RequiredFieldValidator>
            <span><label for="workstationrequirements" id="lblWorkstationRequirements" runat="server">Would you like a TS Specialist to discuss workstation requirements with you?</label></span>
            <asp:RadioButtonList id="rbnWorkstationRequirements" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
                      
            <div style="clear:both;"></div>  
                <br />
                <br />
                
            <!-- Submit Button ................................................... -->
            <asp:ImageButton 
                ID="SubmitButton" 
                CssClass="submit-right"  
                ImageUrl="~/images/button-contact-submit.gif" 
                runat="server" 
                EnableViewState="False" 
                OnClick="SubmitButton_Click" 
                ToolTip="Press to submit" />
            <asp:ImageButton 
                ID="ResetButton"
                CssClass="submit-right"
                ImageUrl="~/images/button-contact-reset.gif" 
                runat="server" 
                EnableViewState="False" 
                OnClick="ResetButton_Click" 
                ToolTip="Press to reset" />
                </asp:Panel> 
                
                <div style="clear:both;"></div>  
                
                <br />
                <br />
                <br />
                <br />
                <br />
                <br />
                
                <div style="clear:both;"></div>
                
                <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="HiddenField1"
                PopupControlID="pnlAddSiteInfo" BackgroundCssClass="modalBackground" DropShadow="true">
                </cc1:ModalPopupExtender>
                <asp:HiddenField ID="HiddenField1" runat="server" />
    </fieldset>
</div>
<asp:ObjectDataSource 
	    ID="StatesDataSource" 
	    runat="server" 
	    OldValuesParameterFormatString="original_{0}" 
	    SelectMethod="GetStates" 
	    TypeName="CompassLearning.Data.DataManager"></asp:ObjectDataSource>
 
 
user control code-behind:
 
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;
using CompassLearning.Web;
 
public partial class Controls_SiteAssessmentChecklistForm : System.Web.UI.UserControl
{
    DataTable myDt = null;
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            myDt = new DataTable();
            myDt = CreateDataTable();
            Session["myDatatable"] = myDt;
 
            this.gvSiteInfo.DataSource = ((DataTable)Session["myDatatable"]).DefaultView;
            this.gvSiteInfo.DataBind();
        }
 
        lblTitle.Text = "Site Assessment Questionnaire";
 
        if (Request.Browser.Type.ToLower() == "ie6")
        {
            ResetButton.CssClass = "submit-right-IE6-left-margin-fix";
        }
    }
 
    protected void ResetButton_Click(object sender, ImageClickEventArgs e)
    {
        cleanFields(this);
    }
 
    protected void SubmitButton_Click(object sender, ImageClickEventArgs e)
    {
        EnableValidators(true);
 
        contactEmail.Text = contactEmail.Text.Trim();
 
        Page.Validate();
 
        if (Page.IsValid)
        {
            ComposeEmail();
 
            msgSuccess.Visible = true;
            pnlHideFields.Visible = false;
 
            cleanFields(this);
        }
        else
        {
            ValidateControls();
        }
    }
 
    protected void ValidateControls()
    {
        HtmlGenericControl[] controls = {lblSiteName, lblAddress, lblCity, lblState, lblZip, 
            lblSiteDescription, lblContactName, lblContactPhoneNumber, lblContactEmail, 
            lblCompassLearningContact, lblTechContactEmail, lblISPConnectionSpeed, lblWANConnectionSpeed,
            lblLANConnectionSpeed, lblWirelessConnection, lblDirectConnection, lblTotalConcurrentUsers,
            lblK8ConcurrentUsers, lblHSAPConcurrentUsers, lblCachingServer, 
            lblBandwidthUtilization, lblNetworkDiagram, lblServerRequirements, lblWorkstationRequirements};
        IValidator[][] validators = { new IValidator[] { valrSiteName }, new IValidator[] { valrAddress }, 
            new IValidator[] { valrCity }, new IValidator[] { valrState }, new IValidator[] { valrZip, valeZip }, 
            new IValidator[] { valrSiteDescription }, new IValidator[] { valrContactName }, 
            new IValidator[] { valxContactPhoneNumber }, new IValidator[] { valrContactEmail, valeContactEmail }, 
            new IValidator[] { valrCompassLearningContact }, new IValidator[] { valxTechContactEmail },
            new IValidator[] { valrISPConnectionSpeed }, new IValidator[] { valrWANConnectionSpeed },
            new IValidator[] { valrLANConnectionSpeed }, new IValidator[] { valrWirelessConnection },
            new IValidator[] { valrDirectConnection }, new IValidator[] { valrTotalConcurrentUsers },
            new IValidator[] { valrK8ConcurrentUsers }, new IValidator[] { valrHSAPConcurrentUsers },
            new IValidator[] { valrCachingServer }, new IValidator[] { valrBandwidthUtilization }, 
            new IValidator[] {valrNetworkDiagram }, new IValidator[] { valrServerRequirements }, 
            new IValidator[] { valrWorkstationRequirements }};
 
        string txtVal = "You must enter a value in the following fields:\\n\\n";
 
        for (int i = 0; i < controls.Length; i++)
        {
            bool valid = true;
            foreach (IValidator validator in validators[i])
            {
                valid &= validator.IsValid;
            }
 
            if (valid == false)
            {
                txtVal +=  RemoveSpecialChars(controls[i].InnerHtml) + "\\n ";
            }
 
            controls[i].Visible = valid;
        }
 
        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "validation", "<script type=\"text/javascript\">alert('" + txtVal + "');</script>", false);
    }
 
    protected void cleanFields(Control container)
    {
        foreach (Control c in container.Controls)
        {
            if (c is TextBox)
            {
                ((TextBox)c).Text = string.Empty;
            }
            if (c is DropDownList)
            {
                ((DropDownList)c).SelectedIndex = 0;
            }
            if (c is ListBox)
            {
                ((ListBox)c).ClearSelection();
            }
            if (c is RadioButtonList)
            {
                ((RadioButtonList)c).ClearSelection();
            }
            if (c is CheckBoxList)
            {
                ((CheckBoxList)c).ClearSelection();
            }
            if (c is CheckBox)
            {
                ((CheckBox)c).Checked = false;
            }
            this.cleanFields(c);
        }
    }
 
    protected void EnableValidators(bool toggle)
    {
        valrSiteName.Enabled = toggle;
        valrAddress.Enabled = toggle;
        valrCity.Enabled = toggle;
        valrState.Enabled = toggle;
        valrZip.Enabled = toggle;
        valrSiteDescription.Enabled = toggle;
        valrContactName.Enabled = toggle;
        valxContactPhoneNumber.Enabled = toggle;
        valrContactEmail.Enabled = toggle;
        valrCompassLearningContact.Enabled = toggle;
        valeContactEmail.Enabled = toggle;
        valxTechContactEmail.Enabled = toggle;
        valrISPConnectionSpeed.Enabled = toggle;
        valrWANConnectionSpeed.Enabled = toggle;
        valrLANConnectionSpeed.Enabled = toggle;
        valrWirelessConnection.Enabled = toggle;
        valrDirectConnection.Enabled = toggle;
        valrTotalConcurrentUsers.Enabled = toggle;
        valrK8ConcurrentUsers.Enabled = toggle;
        valrHSAPConcurrentUsers.Enabled = toggle;
        valrCachingServer.Enabled = toggle;
        valrBandwidthUtilization.Enabled = toggle;
        valrNetworkDiagram.Enabled = toggle;
        valrServerRequirements.Enabled = toggle;
        valrWorkstationRequirements.Enabled = toggle;     
    }
 
   
 
    protected void ComposeEmail()
    {
        //Get email app key settings
        string strTo = ConfigurationSettings.AppSettings["SiteAssessmentFormTo"].ToString();
        string strFrom = ConfigurationSettings.AppSettings["SiteAssessmentFormFrom"].ToString(); 
 
        //Create a new mail message
        System.Net.Mail.MailMessage mailmsg = new System.Net.Mail.MailMessage(strFrom, strTo);
        mailmsg.IsBodyHtml = true;
 
        //Body of message                
        mailmsg.Body = "<div style=\"font-family:Arial; font-size:12px;\"><b>" + mailmsg.Subject + "</b><br />";
        mailmsg.Body += "<i>(This is an automated email. Please do not reply.)</i><br /><br />";
 
        AddRowToEmailBody(ref mailmsg, lblSiteName.InnerHtml, txtSiteName.Text);
        AddRowToEmailBody(ref mailmsg, lblAddress.InnerHtml, txtAddress.Text);
        AddRowToEmailBody(ref mailmsg, lblCity.InnerHtml, txtCity.Text);
        AddRowToEmailBody(ref mailmsg, lblState.InnerHtml, ddlState.SelectedItem.Text);
        AddRowToEmailBody(ref mailmsg, lblZip.InnerHtml, txtZip.Text);
        AddRowToEmailBody(ref mailmsg, lblContactName.InnerHtml, txtContactName.Text);
        AddRowToEmailBody(ref mailmsg, lblContactPhoneNumber.InnerHtml, contactphoneAreacode.Text + "-" + contactphonePrefix.Text + "-" + contactphoneSuffix.Text);
        AddRowToEmailBody(ref mailmsg, lblContactEmail.InnerHtml, contactEmail.Text);
        AddRowToEmailBody(ref mailmsg, lblCompassLearningContact.InnerHtml, txtCompassLearningContact.Text);
 
        mailmsg.Body += "<br /><b>Technical Contact Information</b><br />";
 
        if (cbDuplicateContactInfo.Visible == true) AddRowToEmailBody(ref mailmsg, lblDuplicateContactInfo.InnerHtml, cbDuplicateContactInfo.Checked.ToString());
        if (cbDuplicateContactInfo.Checked == false)
        {
            if (txtTechContactName.Visible == true) AddRowToEmailBody(ref mailmsg, Label1.InnerHtml, txtTechContactName.Text);
            if (techcontactphoneAreacode.Visible == true) AddRowToEmailBody(ref mailmsg, Label3.InnerHtml, techcontactphoneAreacode.Text + "-" + techcontactphonePrefix.Text + "-" + techcontactphoneSuffix.Text);
            if (techcontactAlternateAreacode.Visible == true) AddRowToEmailBody(ref mailmsg, Label4.InnerHtml, techcontactAlternateAreacode.Text + "-" + techcontactAlternatePrefix.Text + "-" + techcontactAlternateSuffix.Text);
            if (txtTechContactEmail.Visible == true) AddRowToEmailBody(ref mailmsg, lblTechContactEmail.InnerHtml, txtTechContactEmail.Text);
        }
 
        mailmsg.Body += "<br /><b>Site Information</b><br />";
 
        if (valrISPConnectionSpeed.Enabled == true) AddRowToEmailBody(ref mailmsg, lblISPConnectionSpeed.InnerHtml, txtISPConnectionSpeed.Text);
        if (valrWANConnectionSpeed.Enabled == true) AddRowToEmailBody(ref mailmsg, lblWANConnectionSpeed.InnerHtml, txtWANConnectionSpeed.Text);
        if (valrLANConnectionSpeed.Enabled == true) AddRowToEmailBody(ref mailmsg, lblLANConnectionSpeed.InnerHtml, txtLANConnectionSpeed.Text);
 
        if (valrWirelessConnection.Enabled == true) AddRowToEmailBody(ref mailmsg, lblWirelessConnection.InnerHtml, rbnWirelessConnection.SelectedItem.Text);
        if (valrDirectConnection.Enabled == true) AddRowToEmailBody(ref mailmsg, lblDirectConnection.InnerHtml, rbnDirectConnection.SelectedItem.Text);
        if (valrTotalConcurrentUsers.Enabled == true) AddRowToEmailBody(ref mailmsg, lblTotalConcurrentUsers.InnerHtml, txtTotalConcurrentUsers.Text);
        if (valrK8ConcurrentUsers.Enabled == true) AddRowToEmailBody(ref mailmsg, lblK8ConcurrentUsers.InnerHtml, txtK8ConcurrentUsers.Text);
        if (valrHSAPConcurrentUsers.Enabled == true) AddRowToEmailBody(ref mailmsg, lblHSAPConcurrentUsers.InnerHtml, txtHSAPConcurrentUsers.Text);
        if (valrCachingServer.Enabled == true) AddRowToEmailBody(ref mailmsg, lblCachingServer.InnerHtml, rbnCachingServer.SelectedItem.Text);
        if (valrBandwidthUtilization.Enabled == true) AddRowToEmailBody(ref mailmsg, lblBandwidthUtilization.InnerHtml, rbnBandwidthUtilization.SelectedItem.Text);
        
        if (valrNetworkDiagram.Enabled == true) AddRowToEmailBody(ref mailmsg, lblNetworkDiagram.InnerHtml, rbnNetworkDiagram.SelectedItem.Text);
        if (valrServerRequirements.Enabled == true) AddRowToEmailBody(ref mailmsg, lblServerRequirements.InnerHtml, rbnServerRequirements.SelectedItem.Text);
        if (valrWorkstationRequirements.Enabled == true) AddRowToEmailBody(ref mailmsg, lblWorkstationRequirements.InnerHtml, rbnWorkstationRequirements.SelectedItem.Text);
 
        mailmsg.Body += "</div>";   
        
  
        //Send Email
        SendMail.Send(mailmsg, null);
    }
 
    protected void AddRowToEmailBody(ref System.Net.Mail.MailMessage mailmsg, string label, string field)
    {
        mailmsg.Body += "<i>" + label.Replace("<br />", "") + "</i>&nbsp;&nbsp;<b>" + field + "</b><br />";
    }
 
    protected void valxContactPhoneNumber_ServerValidate(object source, ServerValidateEventArgs args)
    {
        String areacodeRegex = "\\d{3}";
        String prefixRegex = "\\d{3}";
        String suffixRegex = "\\d{4}";
        if ((!Regex.IsMatch(contactphoneAreacode.Text, areacodeRegex)
                    || (!Regex.IsMatch(contactphonePrefix.Text, prefixRegex) || (!Regex.IsMatch(contactphoneSuffix.Text, suffixRegex)))))
        {
            args.IsValid = false;
            lblContactPhoneNumber.Attributes.CssStyle.Add("display", "none");
        }
        else
        {
            args.IsValid = true;
            lblContactPhoneNumber.Attributes.Clear();
        }
    }
 
    protected void cbDuplicateContactInfo_CheckedChanged(object sender, EventArgs e)
    {
        if (cbDuplicateContactInfo.Checked)
        {
            pnlTechContact.Visible = false;
        }
    }
 
    /// <summary>
    /// Remove special chars from a string
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public static string RemoveSpecialChars(string input)
    {
        string result = input;
        string forbidden = "*,(,),',%,{,},&,<strong>,</strong>,<span class=\"required\">,</span>,#8224;,<br />,:";
        string[] tmp = forbidden.Split(new char[] { ',' });
        for (int i = 0; i <= tmp.Length - 1; i++)
        {
            result = result.Replace(tmp[i].ToString(), "");
        }
        return result;
    }
 
    private DataTable CreateDataTable()
    {
        DataTable myDataTable = new DataTable();
 
        DataColumn myDataColumn;
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Site Name";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "ISP";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "WAN";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "LAN";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Workstations connect wirelessly?";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Direct connection to ISP?";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Total On-Site";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Using K-8";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Using HS/AP";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Caching Server at site?";
        myDataTable.Columns.Add(myDataColumn);
 
        return myDataTable;
    }
 
 
    private void AddDataToTable(string sitename, string ISP, string WAN, string LAN, string wireless, string directConnection, string onsite, string k8, string ap, string cachingServer, DataTable myTable)
    {
        DataRow row;
 
        row = myTable.NewRow();
 
        row["Site Name"] = sitename;
        row["ISP"] = ISP;
        row["WAN"] = WAN;
        row["LAN"] = LAN;
        row["Workstations connect wirelessly?"] = wireless;
        row["Direct Connection to ISP?"] = directConnection;
        row["Total On-Site"] = onsite;
        row["Using K-8"] = k8;
        row["Using HS/AP"] = ap;
        row["Caching Server at site?"] = cachingServer;
 
        myTable.Rows.Add(row);
    }
 
    protected void gvSiteInfo_RowCreated(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Header)
        {
            GridViewRow row = new GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal);
            Table t = (Table)gvSiteInfo.Controls[0];
 
            // Adding Cells
            TableCell SiteName = new TableHeaderCell();
            SiteName.ColumnSpan = 1;
            SiteName.Width = 150;
            row.Cells.Add(SiteName);
 
            TableCell connectionSpeed = new TableHeaderCell();
            connectionSpeed.ColumnSpan = 3; // ********
            connectionSpeed.Text = "Connection Speed";
            connectionSpeed.Width = 150;
            row.Cells.Add(connectionSpeed);
 
            TableCell wireless = new TableHeaderCell();
            wireless.ColumnSpan = 1;
            wireless.Width = 75;
            row.Cells.Add(wireless);
 
            TableCell directConnection = new TableHeaderCell();
            directConnection.ColumnSpan = 1;
            directConnection.Width = 75;
            row.Cells.Add(directConnection);
 
            TableCell concurrentUsers = new TableHeaderCell();
            concurrentUsers.ColumnSpan = 3; // ********
            concurrentUsers.Text = "# Concurrent Users";
            concurrentUsers.Width = 225;
            row.Cells.Add(concurrentUsers);
 
            TableCell cachingServer = new TableHeaderCell();
            cachingServer.ColumnSpan = 1; // ********
            cachingServer.Width = 75;
            row.Cells.Add(cachingServer);
 
            t.Rows.AddAt(0, row);
        }
    }
 
    protected void btnAddSiteInfo_Click(object sender, EventArgs e)
    {
        this.ModalPopupExtender1.Show();
        pnlSiteInfo.Visible = true;
        pnlAddSiteInfo.Visible = true;
    }
 
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        this.ModalPopupExtender1.Show();
 
        AddDataToTable(txtSiteName.Text.Trim(), txtISPConnectionSpeed.Text.Trim(), 
            txtWANConnectionSpeed.Text.Trim(), txtLANConnectionSpeed.Text.Trim(), 
            rbnWirelessConnection.SelectedItem.Text.ToString(), 
            rbnDirectConnection.SelectedItem.Text.ToString(),
            txtTotalConcurrentUsers.Text.Trim(), txtK8ConcurrentUsers.Text.Trim(), 
            txtHSAPConcurrentUsers.Text.Trim(), rbnCachingServer.SelectedItem.Text.ToString(), 
            (DataTable)Session["myDataTable"]);
 
        this.gvSiteInfo.DataSource = ((DataTable)Session["myDatatable"]).DefaultView;
        this.gvSiteInfo.DataBind();
 
        this.txtSiteName.Text = "";
        this.txtISPConnectionSpeed.Text = "";
        this.txtWANConnectionSpeed.Text = "";
        this.txtLANConnectionSpeed.Text = "";
        this.rbnWirelessConnection.ClearSelection();
        this.rbnDirectConnection.ClearSelection();
        this.txtTotalConcurrentUsers.Text = "";
        this.txtK8ConcurrentUsers.Text = "";
        this.txtHSAPConcurrentUsers.Text = "";
        this.rbnCachingServer.ClearSelection();
    }
}

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
847:
848:
849:
850:
851:
852:
853:
854:
855:
856:
857:
858:
859:
860:
861:
862:
863:
864:
865:
866:
867:
868:
869:
870:
871:
872:
873:
874:
875:
876:
877:
878:
879:
880:
881:
882:
883:
884:
885:
886:
887:
888:
889:
890:
891:
892:
893:
894:
895:
896:
897:
898:
899:
900:
901:
902:
903:
904:
905:
906:
907:
908:
909:
910:
911:
912:
913:
914:
915:
916:
917:
918:
919:
920:
921:
922:
923:
924:
925:
926:
927:
928:
929:
930:
931:
932:
933:
934:
935:
936:
937:
938:
939:
940:
941:
942:
943:
944:
945:
946:
947:
948:
949:
950:
951:
952:
953:
954:
955:
956:
957:
958:
959:
960:
961:
962:
963:
964:
965:
966:
967:
968:
969:
970:
971:
972:
973:
974:
975:
976:
977:
978:
979:
980:
981:
982:
983:
984:
985:
986:
987:
988:
989:
990:
991:
992:
993:
994:
995:
996:
997:
998:
999:
1000:
1001:
1002:
1003:
1004:
1005:
1006:
1007:
1008:
1009:
1010:
1011:
1012:
1013:
1014:
1015:
1016:
1017:
1018:
1019:
1020:
1021:
1022:
1023:
1024:
1025:
1026:
1027:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-30 at 12:57:05ID24774981
Tags

asp.net

,

ajax

Topics

Programming for ASP.NET

,

Asynchronous Javascript and XML (AJAX)

Participating Experts
1
Points
500
Comments
14

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Populate GridView in ASP Page with SQL database table
    I need to populate a gridview in my ASP page with a SQL 2005 database table. The table is called TestTable and my gridview is called GridView1. Can someone please give me good direction on this?
  2. GridView Paging
    Hi, I have a form with 3 GridViews on it. I need to include Paging on only 2 of the GridViews the other does not need paging. When I run my application and go to the page with the 3 GridView and if I choose one of them for Paging i do not see the other GridView listed belo...
  3. GridView
    I am using a gridview control with bound datafields. The query returns 6 fields from the DB. Fields are: ID field, Client Name, and then 4 boolean fields. These are currently all bound fields, the first two fields (ID and Client Name) are intended to display the text con...
  4. Gridview in Update Panel
    I have a gridview that is enclosed in an AJAX Extensions updatepanel. I have an objectdatasource that I want to bind to the selectedvalue of the gridview. When I try to set the parameter source to the gridview control, the gridview is not displayed in controlid dropdownlist...
  5. GridView
    Hello there, I have a gridview on my page that display the search results.. How can I have the grid to display all the time10 records? then when I search I can see only the ones that matches the search?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: sksJegadeeshPosted on 2009-09-30 at 13:09:12ID: 25462916

flickering means what??. did you debugged. is your button click event is getting firing all the times.
or not at all firing the button click event??

 

by: -Dman100-Posted on 2009-09-30 at 13:17:00ID: 25463007

I set a breakpoint on the the btnAddSiteInfo_Click event on the following line:

this.ModalPopupExtender1.Show()

When I debug the page and click the btnAddSiteInfo, the code where I have the breakpoint never seems to get fired.  The breakpoint does not allow me to step into the code.

What I mean by flickering is that when I click on the btnAddSiteInfo the ModalPopup displays where I can add rows to the gridview.  Each time I click Add the ModalPopup flickers very quickly and I can see mometarily what appears to be the gridview with a row of data.

Does that help explain?

 

by: sksJegadeeshPosted on 2009-09-30 at 13:26:54ID: 25463125

from your comment, i come to know that bttAddSiteInfo_Click not at all firing as the breakpoint is not hitting moreover. is it?

i also faced the prob.. it seems like only call back. not the post back.. is it??

i fixed that one like

in the page load event i checked the Request.Params["__EventArgument"].Contains("btnAddSiteInfo")

if true

then i did the whatever manipulation there

 

by: -Dman100-Posted on 2009-09-30 at 13:36:54ID: 25463298

The btnAddSiteInfo_Click event appears to be firing because the ModalPopup displays, but I'm not able to step into the code using a breakpoint.

I tried checking the Request.Params, but recieved object not set to instance of object error:

if (Request.Params["_Click"].Contains("btnAddSiteInfo"))
{
     Response.Write("This button click event is getting fired");
}

 

by: sksJegadeeshPosted on 2009-09-30 at 13:41:57ID: 25463366

i understand .. put that modalpopup.show as a last statement

 

by: -Dman100-Posted on 2009-09-30 at 13:42:01ID: 25463367

I added a Response.Write to the btnAddSiteInfo_Click event handler and it is firing, but I'm not able to step into that method using a breakpoint.

 

by: sksJegadeeshPosted on 2009-09-30 at 13:43:23ID: 25463390

this.ModalPopupExtender1.Show();
as a last statement

 

by: -Dman100-Posted on 2009-09-30 at 13:44:01ID: 25463402

I tried moving the ModalPopupExtender.Show as the last statement, but the gridview still doesn't display?
It's strange?  I'm not sure what I'm missing?

protected void btnAddSiteInfo_Click(object sender, EventArgs e)
    {
        pnlSiteInfo.Visible = true;
        pnlAddSiteInfo.Visible = true;
        this.ModalPopupExtender1.Show();
    }

 

by: sksJegadeeshPosted on 2009-09-30 at 13:49:54ID: 25463487

you are assinging pnlAddSiteInfo panel into modalpopup right??
here you dont have gridview right??
girdview is in pnlSiteInfo panel right??
then how you are expecting that gridview should display??

 

by: -Dman100-Posted on 2009-09-30 at 13:50:10ID: 25463491

Also, I got a screen capture (see attached image) that shows the gridview behind the modal popup that clearly displays the gridview populated when I add the data thru the modal popup window.  Yet, when I close the modal popup window, the panel that contains the gridview will not display.

 

by: -Dman100-Posted on 2009-09-30 at 13:56:05ID: 25463557

yes, I am assinging pnlAddSiteInfo panel into modalpopup.

here you dont have gridview right??  Correct.
girdview is in pnlSiteInfo panel right??  Correct.

then how you are expecting that gridview should display??  I'm not sure I understand.  Should the gridview display in the pnlSiteInfo when the modalPopup is closed.  I have another example of doing this and it works fine.  I might not be understanding correctly.

I appreciate the help.

 

by: sksJegadeeshPosted on 2009-09-30 at 14:00:42ID: 25463601

I dont know exactly. may be it causing partial postback. you can try one thing

you can add two update panel within that panels. add use update panel triggers in 2nd panel that means pnlAddSiteInfo (i think this panel is used in modal popup).. this triggers you call asyncallback for that 1 st panel by mentioning the panel id.

i think it should work..

bye i am going for bed... see you tomo..

 

by: -Dman100-Posted on 2009-09-30 at 20:10:18ID: 25465728

Hi sksJegadeesh,

I did some testing and if I remove the ModalPopupExtender and the panels and run the page, the gridview gets populated and displays without any problem.  But as soon as I add the ModalPopupExtender and the panels, the gridview disappears.  So, it appears to have something to do with the ModalPopupExtender.

I'm not clear on what you are referring to with the update panels.  Can you clarify?

See all my code below.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SiteAssessmentChecklistForm.ascx.cs" Inherits="Controls_SiteAssessmentChecklistForm" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<style type="text/css">
    .modalBackground {
        background-color:Gray;
        filter:alpha(opacity=70);
        opacity:0.7;
     }
     .modalPopup {
        background-color:#ffffdd;
        border-width:3px;
        border-style:solid;
        border-color:Gray;
        padding:3px;
        width:800px;
     }
</style>
 
<div id="contactForm" runat="server" class="contact-icg-form">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>  
    
    
    <fieldset>
        <legend><asp:Literal ID="lblTitle" runat="server"></asp:Literal></legend>
        
            <p id="msgSuccess" runat="server" visible="false">
            Thank you.  Your information has been successfully processed.
            </p>
            
            <asp:Panel ID="pnlHideFields" runat="server">
            <p>
            The following information will allow CompassLearning Technical Services to evaluate your network
            infrastructure and make a recommendation on whether additional hardware is required to effectively 
            run Odyssey Hardware. 
            </p>
            
            <p><span class="required"><strong>NOTE:</strong> All fields are required.</span></p>
            
            <!-- Primary Site Information ........................................ -->
            <h3>Primary Site Information</h3>
 
            <!-- Site Name ...................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrSiteName" 
                runat="server" 
                ControlToValidate="txtSiteName"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Site Name:</span>"></asp:RequiredFieldValidator>            
            <span><label for="sitename" id="lblSiteName" runat="server">Site Name:</label></span>
            <asp:TextBox ID="txtSiteName" runat="server"></asp:TextBox>
            
            <!-- Address .......................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrAddress" 
                runat="server" 
                ControlToValidate="txtAddress"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Address:</span>"></asp:RequiredFieldValidator>            
            <span><label for="address" id="lblAddress" runat="server">Address:</label></span>
            <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
            
            <!-- City ............................................................ -->
            <asp:RequiredFieldValidator 
                ID="valrCity" 
                runat="server" 
                ControlToValidate="txtCity"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>City:</span>"></asp:RequiredFieldValidator>            
            <span><label for="city" id="lblCity" runat="server">City:</label></span>
            <asp:TextBox ID="txtCity" runat="server"></asp:TextBox>
            
            <!-- State ........................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrState" 
                runat="server" 
                ControlToValidate="ddlState"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>State:</span>"></asp:RequiredFieldValidator>            
            <span><label for="state" id="lblState" runat="server">State:</label></span>
            <asp:DropDownList 
		        ID="ddlState" 
		        runat="server" 
		        AppendDataBoundItems="true"
		        DataSourceID="StatesDataSource" 
		        DataTextField="Name" 
		        DataValueField="StateAbr">                
		    <asp:ListItem Selected="True" Value="">Please select...</asp:ListItem>
            </asp:DropDownList>
            
            <!-- Zip ............................................................. -->
            <asp:RequiredFieldValidator 
                ID="valrZip" 
                runat="server" 
                ControlToValidate="txtZip"
                Display="Dynamic" 
                EnableClientScript="False" 
                Enabled="False" 
                ErrorMessage="<span class='alert'>Zip:</span>"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator 
                ID="valeZip" 
                runat="server"
                ControlToValidate="txtZip" 
                Display="Dynamic" 
                EnableClientScript="False" 
                Enabled="False"
                ErrorMessage="<span class='alert'>Zip:</span>" 
                ValidationExpression="\d{5}(-\d{4})?"></asp:RegularExpressionValidator>           
                <span><label for="zip" id="lblZip" runat="server">Zip:</label></span>
                <asp:TextBox ID="txtZip" runat="server" MaxLength="5" Width="50px"></asp:TextBox>
            
            <!-- Site Description ................................................. -->
            <asp:RequiredFieldValidator 
                ID="valrSiteDescription" 
                runat="server" 
                ControlToValidate="ddlSiteDescription"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Site Description:</span>"></asp:RequiredFieldValidator>
            <span><label for="sitedescription" id="lblSiteDescription" runat="server">Site Description:</label></span>      
            <asp:DropDownList ID="ddlSiteDescription" runat="server">                
		        <asp:ListItem Selected="True" Value="">Please select...</asp:ListItem>
                <asp:ListItem value="School">School</asp:ListItem>
                <asp:ListItem value="District Office">District Office</asp:ListItem>
                <asp:ListItem value="Other">Other</asp:ListItem>
            </asp:DropDownList> 
            
            <div style="clear:both;"></div>
            
            <!-- Specify Other Site Description ................................... -->           
            <span><label for="specifyothersitedescription" id="lblSpecifyOtherSiteDescription" runat="server">If other, specify:</label></span>
            <asp:TextBox ID="txtSpecifyOtherSiteDescription" runat="server"></asp:TextBox>
                
            <!-- Contact Information .............................................. -->
            <h3>Primary Contact Information</h3>
                
            <!-- Contact Name ..................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrContactName" 
                runat="server" 
                ControlToValidate="txtContactName"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Full Name:</span>"></asp:RequiredFieldValidator>            
            <span><label for="contactname" id="lblContactName" runat="server">Full Name:</label></span>
            <asp:TextBox ID="txtContactName" runat="server"></asp:TextBox>
            
            <!-- Contact Phone Number .............................................. -->
            <asp:CustomValidator 
                ID="valxContactPhoneNumber" 
                runat="server" 
                EnableClientScript="false"
                SetFocusOnError="true" 
                ErrorMessage="<span class='alert'>Phone Number:</span>"
                Display="dynamic" OnServerValidate="valxContactPhoneNumber_ServerValidate" Enabled="False" ForeColor=""></asp:CustomValidator>	
            <span><label for="contactphonenumber" id="lblContactPhoneNumber" runat="server">Phone Number:</label></span>
            <asp:TextBox 
                ID="contactphoneAreacode" 
                runat="server" 
                TextMode="SingleLine" 
                MaxLength="3"
                ToolTip="Phone Number Area Code" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="contactphonePrefix" 
                runat="server"
                MaxLength="3" 
                TextMode="SingleLine" 
                ToolTip="Phone Number Prefix" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="contactphoneSuffix" 
                runat="server"
                MaxLength="4" 
                TextMode="SingleLine" 
                ToolTip="Phone Number Suffix" Width="30px" CssClass="phone"></asp:TextBox>
                
            <!-- Contact Alternate Number ............................................... -->
            <div> 
            <span><label for="contactalternatenumber" id="lblContactAlternateNumber" runat="server">Alternate Number:</label></span>
            <asp:TextBox 
                ID="contactAlternateAreacode" 
                runat="server" 
                TextMode="SingleLine" 
                MaxLength="3"
                ToolTip="Alternate Number Area Code" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="contactAlternatePrefix" 
                runat="server"
                MaxLength="3" 
                TextMode="SingleLine" 
                ToolTip="Alternate Number Prefix" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="contactAlternateSuffix" 
                runat="server"
                MaxLength="4" 
                TextMode="SingleLine" 
                ToolTip="Alternate Number Suffix" Width="30px" CssClass="phone"></asp:TextBox>
            </div>
            
            <!-- Contact Email .................................................... -->
            <asp:RequiredFieldValidator 
                ID="valrContactEmail" 
                runat="server" 
                ControlToValidate="contactEmail"
                EnableClientScript="false"
                SetFocusOnError="true" 
                ErrorMessage="<span class='alert'>Email:</span>"
                Display="dynamic" 
                Enabled="False" ForeColor=""></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator 
                ID="valeContactEmail" 
                runat="server"
                ControlToValidate="contactEmail"
                EnableClientScript="false"
                SetFocusOnError="true"
                ErrorMessage="<span class='alert'>Email:</span>"
                Display="dynamic" 
                Enabled="False" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ForeColor=""></asp:RegularExpressionValidator>
            <span><label for="contactemail" id="lblContactEmail" runat="server">Email:</label></span>
            <asp:TextBox 
                ID="contactEmail" 
                runat="server" 
                TextMode="SingleLine" 
                ToolTip="Contact Email Address"></asp:TextBox>
            
            <!-- CompassLearning Contact ......................................... -->
            <asp:RequiredFieldValidator 
                ID="valrCompassLearningContact" 
                runat="server" 
                ControlToValidate="txtCompassLearningContact"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>CompassLearning Contact:</span>"></asp:RequiredFieldValidator>            
            <span><label for="compasslearningcontact" id="lblCompassLearningContact" runat="server">CompassLearning Contact:</label></span>
            <asp:TextBox ID="txtCompassLearningContact" runat="server"></asp:TextBox>
            
            
            <!-- Technical Contact Section ....................................... -->
            <h3>Technical Contact</h3>
            
            <span><label for="duplicatecontactinfo" id="lblDuplicateContactInfo" runat="server">Please check if same as administrative contact.</label></span>
            <asp:CheckBox ID="cbDuplicateContactInfo" runat="server" CssClass="checkbox-list" AutoPostBack="True" OnCheckedChanged="cbDuplicateContactInfo_CheckedChanged" />
            
            <div style="clear:both;"></div>
            
            <asp:Panel ID="pnlTechContact" runat="server">
            <!-- Technical Contact Name .......................................... -->          
            <span><label for="contactname" id="Label1" runat="server">Full Name:</label></span>
            <asp:TextBox ID="txtTechContactName" runat="server"></asp:TextBox>
            
            <!-- Technical Contact Phone Number .................................. -->
            <span><label for="contactphonenumber" id="Label3" runat="server">Phone Number:</label></span>
            <asp:TextBox 
                ID="techcontactphoneAreacode" 
                runat="server" 
                TextMode="SingleLine" 
                MaxLength="3"
                ToolTip="Technical Contact Phone Number Area Code" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="techcontactphonePrefix" 
                runat="server"
                MaxLength="3" 
                TextMode="SingleLine" 
                ToolTip="Technical Contact Phone Number Prefix" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="techcontactphoneSuffix" 
                runat="server"
                MaxLength="4" 
                TextMode="SingleLine" 
                ToolTip="Technical Contact Phone Number Suffix" Width="30px" CssClass="phone"></asp:TextBox>
                
            <!-- Technical Contact Alternate Number ................................ -->
            <div>
            <span><label for="contactalternatenumber" id="Label4" runat="server">Alternate Number:</label></span>
            <asp:TextBox 
                ID="techcontactAlternateAreacode" 
                runat="server" 
                TextMode="SingleLine" 
                MaxLength="3"
                ToolTip="Technical Alternate Number Area Code" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="techcontactAlternatePrefix" 
                runat="server"
                MaxLength="3" 
                TextMode="SingleLine" 
                ToolTip="Technical Alternate Number Prefix" Width="25px" CssClass="phone"></asp:TextBox>
            <asp:TextBox 
                ID="techcontactAlternateSuffix" 
                runat="server"
                MaxLength="4" 
                TextMode="SingleLine" 
                ToolTip="Technical Alternate Number Suffix" Width="30px" CssClass="phone"></asp:TextBox>
            </div>
            
            <!-- Technical Contact Email ........................................... -->
                <asp:RegularExpressionValidator 
                ID="valxTechContactEmail" 
                runat="server"
                ControlToValidate="txtTechContactEmail"
                EnableClientScript="false"
                SetFocusOnError="true"
                ErrorMessage="<span class='alert'>Email:</span>"
                Display="dynamic" 
                Enabled="False" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ForeColor=""></asp:RegularExpressionValidator>
            <span><label for="techcontactemail" id="lblTechContactEmail" runat="server">Email:</label></span>
            <asp:TextBox 
                ID="txtTechContactEmail" 
                runat="server" 
                TextMode="SingleLine" 
                ToolTip="Technical Contact Email Address"></asp:TextBox>
            </asp:Panel>
            
            <!-- Site Information ................................................ -->
            <h3>Site Information</h3>
            
        
            <asp:Button runat="server" ID="btnAddSiteInfo" Text="Add Site" Width="100px" OnClick="btnAddSiteInfo_Click" />
            
            <asp:Panel runat="server" ID="pnlSiteInfo" Visible="false">
            <asp:GridView runat="server" ID="gvSiteInfo" Width="750" OnRowCreated="gvSiteInfo_RowCreated" >
                <RowStyle Font-Size="1.2em" />
                <HeaderStyle Font-Size="1.2em" ForeColor="#002F68" />
            </asp:GridView>
            </asp:Panel>
            
            
            <asp:Panel runat="server" ID="pnlAddSiteInfo" CssClass="modalPopup" style="display: none;">
            <!-- Site ............................................................ -->
               <asp:RequiredFieldValidator 
                ID="valrSite" 
                runat="server" 
                ControlToValidate="txtSite"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Site Name:</span>"></asp:RequiredFieldValidator>            
            <span><label for="site" id="lblSite" runat="server">Site Name:</label></span>
            <asp:TextBox ID="txtSite" runat="server"></asp:TextBox>
            
            <!-- ISP Connection Speed ............................................ -->
               <asp:RequiredFieldValidator 
                ID="valrISPConnectionSpeed" 
                runat="server" 
                ControlToValidate="txtISPConnectionSpeed"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the ISP (Internet) Connection Speed?</span>"></asp:RequiredFieldValidator>            
            <span><label for="ispconnectionspeed" id="lblISPConnectionSpeed" runat="server">What is the ISP (Internet) Connection Speed?</label></span>
            <asp:TextBox ID="txtISPConnectionSpeed" runat="server"></asp:TextBox>
            
            <!-- WAN Connection Speed ............................................ -->
               <asp:RequiredFieldValidator 
                ID="valrWANConnectionSpeed" 
                runat="server" 
                ControlToValidate="txtWANConnectionSpeed"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the WAN (District) Connection Speed?</span>"></asp:RequiredFieldValidator>            
            <span><label for="wanconnectionspeed" id="lblWANConnectionSpeed" runat="server">What is the WAN (District) Connection Speed?</label></span>
            <asp:TextBox ID="txtWANConnectionSpeed" runat="server"></asp:TextBox>
            
            <!-- LAN Connection Speed ............................................ -->
               <asp:RequiredFieldValidator 
                ID="valrLANConnectionSpeed" 
                runat="server" 
                ControlToValidate="txtLANConnectionSpeed"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the LAN (Internal) Connection Speed?</span>"></asp:RequiredFieldValidator>            
            <span><label for="lanconnectionspeed" id="lblLANConnectionSpeed" runat="server">What is the LAN (Internal) Connection Speed?</label></span>
            <asp:TextBox ID="txtLANConnectionSpeed" runat="server"></asp:TextBox>
            
            <!-- Wireless Connection .................................................. -->
            <asp:RequiredFieldValidator
                ID="valrWirelessConnection"
                runat="server"
                ControlToValidate="rbnWirelessConnection"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Do the workstations connect wirelessly?</span>"></asp:RequiredFieldValidator>
            <span><label for="wirelessconnection" id="lblWirelessConnection" runat="server">Do the workstations connect wirelessly?</label></span>
            <asp:RadioButtonList id="rbnWirelessConnection" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
            
            <div style="clear:both;"></div>
            
            <!-- Direct Connection ............................................... -->
            <asp:RequiredFieldValidator
                ID="valrDirectConnection"
                runat="server"
                ControlToValidate="rbnDirectConnection"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Is there a direct connection to the ISP?</span>"></asp:RequiredFieldValidator>
            <span><label for="directconnection" id="lblDirectConnection" runat="server">Is there a direct connection to the ISP?</label></span>
            <asp:RadioButtonList id="rbnDirectConnection" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
            
            <div style="clear:both;"></div>
            
            <!-- Total Cuncurrent Users ......................................... -->
               <asp:RequiredFieldValidator 
                ID="valrTotalConcurrentUsers" 
                runat="server" 
                ControlToValidate="txtTotalConcurrentUsers"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the total number of concurrent users on-site?</span>"></asp:RequiredFieldValidator>            
            <span><label for="totalconcurrentusers" id="lblTotalConcurrentUsers" runat="server">What is the total number of concurrent users on-site?</label></span>
            <asp:TextBox ID="txtTotalConcurrentUsers" runat="server"></asp:TextBox>
            
            <!-- K8 Cuncurrent Users ......................................... -->
               <asp:RequiredFieldValidator 
                ID="valrK8ConcurrentUsers" 
                runat="server" 
                ControlToValidate="txtK8ConcurrentUsers"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the number of K-8 concurrent users?</span>"></asp:RequiredFieldValidator>            
            <span><label for="k8concurrentusers" id="lblK8ConcurrentUsers" runat="server">What is the number of K-8 concurrent users?</label></span>
            <asp:TextBox ID="txtK8ConcurrentUsers" runat="server"></asp:TextBox>
            
            <!-- HS/AP Cuncurrent Users ......................................... -->
               <asp:RequiredFieldValidator 
                ID="valrHSAPConcurrentUsers" 
                runat="server" 
                ControlToValidate="txtHSAPConcurrentUsers"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>What is the number of HS/AP concurrent users?</span>"></asp:RequiredFieldValidator>            
            <span><label for="HSAPConcurrentUsers" id="lblHSAPConcurrentUsers" runat="server">What is the number of HS/AP concurrent users?</label></span>
            <asp:TextBox ID="txtHSAPConcurrentUsers" runat="server"></asp:TextBox>
            
            
            <!-- Caching Server ................................................. -->
            <asp:RequiredFieldValidator 
                ID="valrCachingServer" 
                runat="server" 
                ControlToValidate="rbnCachingServer"
                EnableClientScript="False" 
                Display="Dynamic"
                Enabled="False" 
                ErrorMessage="<span class='alert'>Is there a caching server at the site?</span>"></asp:RequiredFieldValidator>
            <span><label for="cachingserver" id="lblCachingServer" runat="server">Is there a caching server at the site?</label></span>      
            <asp:RadioButtonList id="rbnCachingServer" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList> 
 
            <div style="clear:both;"></div>
            
            <asp:Button ID="btnAdd" runat="server" Text="Add" Width="100px" OnClick="btnAdd_Click" />
            <asp:Button ID="btnClose" runat="server" Width="100px" Text="Close Window" />
            </asp:Panel>
            
            
             
            <!-- Bandwidth Utilization ........................................... -->
            <asp:RequiredFieldValidator
                ID="valrBandwidthUtilization"
                runat="server"
                ControlToValidate="rbnBandwidthUtilization"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Do you have or can you obtain information on bandwidth utilization?</span>"></asp:RequiredFieldValidator>
            <span><label for="bandwidthutilization" id="lblBandwidthUtilization" runat="server">Do you have or can you obtain information on bandwidth utilization?</label></span>
            <asp:RadioButtonList id="rbnBandwidthUtilization" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList> 
            
            <div style="clear:both;"></div>
            
            <!-- Network Diagram ................................................. -->
            <asp:RequiredFieldValidator
                ID="valrNetworkDiagram"
                runat="server"
                ControlToValidate="rbnNetworkDiagram"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Do you have a network diagram you can provide to CompassLearning?</span>"></asp:RequiredFieldValidator>
            <span><label for="networkdiagram" id="lblNetworkDiagram" runat="server">Do you have a network diagram you can provide to CompassLearning?</label></span>
            <asp:RadioButtonList id="rbnNetworkDiagram" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
            
            <div style="clear:both;"></div>
            
            <!-- Server Requirements ............................................... -->
            <asp:RequiredFieldValidator
                ID="valrServerRequirements"
                runat="server"
                ControlToValidate="rbnServerRequirements"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Would you like a TS Specialist to discuss server requirements with you?</span>"></asp:RequiredFieldValidator>
            <span><label for="serverrequirements" id="lblServerRequirements" runat="server">Would you like a TS Specialist to discuss server requirements with you?</label></span>
            <asp:RadioButtonList id="rbnServerRequirements" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
            
            <div style="clear:both;"></div>         
            
            <!-- Workstation Requirements ............................................ -->
            <asp:RequiredFieldValidator
                ID="valrWorkstationRequirements"
                runat="server"
                ControlToValidate="rbnWorkstationRequirements"
                EnableClientScript="False"
                Display="Dynamic"
                Enabled="False"
                ErrorMessage="<span class='alert'>Would you like a TS Specialist to discuss workstation requirements with you?</span>"></asp:RequiredFieldValidator>
            <span><label for="workstationrequirements" id="lblWorkstationRequirements" runat="server">Would you like a TS Specialist to discuss workstation requirements with you?</label></span>
            <asp:RadioButtonList id="rbnWorkstationRequirements" runat="server" TextAlign="Right" CssClass="radiolist" RepeatLayout="flow" 
                RepeatDirection="horizontal" RepeatColumns="2" >
               <asp:ListItem Value="Yes" Selected="false">Yes</asp:ListItem>
               <asp:ListItem Value="No" Selected="false">No</asp:ListItem>
            </asp:RadioButtonList>
                      
            <div style="clear:both;"></div>  
                <br />
                <br />
                
            <!-- Submit Button ................................................... -->
            <asp:ImageButton 
                ID="SubmitButton" 
                CssClass="submit-right"  
                ImageUrl="~/images/button-contact-submit.gif" 
                runat="server" 
                EnableViewState="False" 
                OnClick="SubmitButton_Click" 
                ToolTip="Press to submit" />
            <asp:ImageButton 
                ID="ResetButton"
                CssClass="submit-right"
                ImageUrl="~/images/button-contact-reset.gif" 
                runat="server" 
                EnableViewState="False" 
                OnClick="ResetButton_Click" 
                ToolTip="Press to reset" />
                 
                
                <div style="clear:both;"></div>  
                
                <br />
                <br />
                <br />
                <br />
                <br />
                <br />
                
                <div style="clear:both;"></div> 
        </asp:Panel> 
        <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="HiddenField1"
                PopupControlID="pnlAddSiteInfo" BackgroundCssClass="modalBackground" DropShadow="true">
        </cc1:ModalPopupExtender>
        <asp:HiddenField ID="HiddenField1" runat="server" />           
    </fieldset>
</div>
<asp:ObjectDataSource 
	    ID="StatesDataSource" 
	    runat="server" 
	    OldValuesParameterFormatString="original_{0}" 
	    SelectMethod="GetStates" 
	    TypeName="CompassLearning.Data.DataManager"></asp:ObjectDataSource>
	    
	    
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;
using CompassLearning.Web;
 
public partial class Controls_SiteAssessmentChecklistForm : System.Web.UI.UserControl
{
    DataTable myDt = null;
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            myDt = new DataTable();
            myDt = CreateDataTable();
            Session["myDatatable"] = myDt;
 
            this.gvSiteInfo.DataSource = ((DataTable)Session["myDatatable"]).DefaultView;
            this.gvSiteInfo.DataBind();
        }
 
        lblTitle.Text = "Site Assessment Questionnaire";
 
        if (Request.Browser.Type.ToLower() == "ie6")
        {
            ResetButton.CssClass = "submit-right-IE6-left-margin-fix";
        }
    }
 
    protected void ResetButton_Click(object sender, ImageClickEventArgs e)
    {
        cleanFields(this);
    }
 
    protected void SubmitButton_Click(object sender, ImageClickEventArgs e)
    {
        EnableValidators(true);
 
        contactEmail.Text = contactEmail.Text.Trim();
 
        Page.Validate();
 
        if (Page.IsValid)
        {
            ComposeEmail();
 
            msgSuccess.Visible = true;
            pnlHideFields.Visible = false;
 
            cleanFields(this);
        }
        else
        {
            ValidateControls();
        }
    }
 
    protected void ValidateControls()
    {
        HtmlGenericControl[] controls = {lblSiteName, lblAddress, lblCity, lblState, lblZip, 
            lblSiteDescription, lblContactName, lblContactPhoneNumber, lblContactEmail, 
            lblCompassLearningContact, lblTechContactEmail, lblSite, lblISPConnectionSpeed, lblWANConnectionSpeed,
            lblLANConnectionSpeed, lblWirelessConnection, lblDirectConnection, lblTotalConcurrentUsers,
            lblK8ConcurrentUsers, lblHSAPConcurrentUsers, lblCachingServer, 
            lblBandwidthUtilization, lblNetworkDiagram, lblServerRequirements, lblWorkstationRequirements};
        IValidator[][] validators = { new IValidator[] { valrSiteName }, new IValidator[] { valrAddress }, 
            new IValidator[] { valrCity }, new IValidator[] { valrState }, new IValidator[] { valrZip, valeZip }, 
            new IValidator[] { valrSiteDescription }, new IValidator[] { valrContactName }, 
            new IValidator[] { valxContactPhoneNumber }, new IValidator[] { valrContactEmail, valeContactEmail }, 
            new IValidator[] { valrCompassLearningContact }, new IValidator[] { valxTechContactEmail },
            new IValidator[] { valrSite }, new IValidator[] { valrISPConnectionSpeed }, new IValidator[] { valrWANConnectionSpeed },
            new IValidator[] { valrLANConnectionSpeed }, new IValidator[] { valrWirelessConnection },
            new IValidator[] { valrDirectConnection }, new IValidator[] { valrTotalConcurrentUsers },
            new IValidator[] { valrK8ConcurrentUsers }, new IValidator[] { valrHSAPConcurrentUsers },
            new IValidator[] { valrCachingServer }, new IValidator[] { valrBandwidthUtilization }, 
            new IValidator[] {valrNetworkDiagram }, new IValidator[] { valrServerRequirements }, 
            new IValidator[] { valrWorkstationRequirements }};
 
        string txtVal = "You must enter a value in the following fields:\\n\\n";
 
        for (int i = 0; i < controls.Length; i++)
        {
            bool valid = true;
            foreach (IValidator validator in validators[i])
            {
                valid &= validator.IsValid;
            }
 
            if (valid == false)
            {
                txtVal +=  RemoveSpecialChars(controls[i].InnerHtml) + "\\n ";
            }
 
            controls[i].Visible = valid;
        }
 
        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "validation", "<script type=\"text/javascript\">alert('" + txtVal + "');</script>", false);
    }
 
    protected void cleanFields(Control container)
    {
        foreach (Control c in container.Controls)
        {
            if (c is TextBox)
            {
                ((TextBox)c).Text = string.Empty;
            }
            if (c is DropDownList)
            {
                ((DropDownList)c).SelectedIndex = 0;
            }
            if (c is ListBox)
            {
                ((ListBox)c).ClearSelection();
            }
            if (c is RadioButtonList)
            {
                ((RadioButtonList)c).ClearSelection();
            }
            if (c is CheckBoxList)
            {
                ((CheckBoxList)c).ClearSelection();
            }
            if (c is CheckBox)
            {
                ((CheckBox)c).Checked = false;
            }
            this.cleanFields(c);
        }
    }
 
    protected void EnableValidators(bool toggle)
    {
        valrSiteName.Enabled = toggle;
        valrAddress.Enabled = toggle;
        valrCity.Enabled = toggle;
        valrState.Enabled = toggle;
        valrZip.Enabled = toggle;
        valrSiteDescription.Enabled = toggle;
        valrContactName.Enabled = toggle;
        valxContactPhoneNumber.Enabled = toggle;
        valrContactEmail.Enabled = toggle;
        valrCompassLearningContact.Enabled = toggle;
        valeContactEmail.Enabled = toggle;
        valxTechContactEmail.Enabled = toggle;
        //valrSite.Enabled = toggle;
        //valrISPConnectionSpeed.Enabled = toggle;
        //valrWANConnectionSpeed.Enabled = toggle;
        //valrLANConnectionSpeed.Enabled = toggle;
        //valrWirelessConnection.Enabled = toggle;
        //valrDirectConnection.Enabled = toggle;
        //valrTotalConcurrentUsers.Enabled = toggle;
        //valrK8ConcurrentUsers.Enabled = toggle;
        //valrHSAPConcurrentUsers.Enabled = toggle;
        //valrCachingServer.Enabled = toggle;
        valrBandwidthUtilization.Enabled = toggle;
        valrNetworkDiagram.Enabled = toggle;
        valrServerRequirements.Enabled = toggle;
        valrWorkstationRequirements.Enabled = toggle;     
    }
 
    protected void EnableModalValidators(bool toggle)
    {
        valrSite.Enabled = toggle;
        valrISPConnectionSpeed.Enabled = toggle;
        valrWANConnectionSpeed.Enabled = toggle;
        valrLANConnectionSpeed.Enabled = toggle;
        valrWirelessConnection.Enabled = toggle;
        valrDirectConnection.Enabled = toggle;
        valrTotalConcurrentUsers.Enabled = toggle;
        valrK8ConcurrentUsers.Enabled = toggle;
        valrHSAPConcurrentUsers.Enabled = toggle;
        valrCachingServer.Enabled = toggle;
    }
 
    protected void ComposeEmail()
    {
        //Get email app key settings
        string strTo = ConfigurationSettings.AppSettings["SiteAssessmentFormTo"].ToString();
        string strFrom = ConfigurationSettings.AppSettings["SiteAssessmentFormFrom"].ToString(); 
 
        //Create a new mail message
        System.Net.Mail.MailMessage mailmsg = new System.Net.Mail.MailMessage(strFrom, strTo);
        mailmsg.IsBodyHtml = true;
 
        //Body of message                
        mailmsg.Body = "<div style=\"font-family:Arial; font-size:12px;\"><b>" + mailmsg.Subject + "</b><br />";
        mailmsg.Body += "<i>(This is an automated email. Please do not reply.)</i><br /><br />";
 
        AddRowToEmailBody(ref mailmsg, lblSiteName.InnerHtml, txtSiteName.Text);
        AddRowToEmailBody(ref mailmsg, lblAddress.InnerHtml, txtAddress.Text);
        AddRowToEmailBody(ref mailmsg, lblCity.InnerHtml, txtCity.Text);
        AddRowToEmailBody(ref mailmsg, lblState.InnerHtml, ddlState.SelectedItem.Text);
        AddRowToEmailBody(ref mailmsg, lblZip.InnerHtml, txtZip.Text);
        AddRowToEmailBody(ref mailmsg, lblContactName.InnerHtml, txtContactName.Text);
        AddRowToEmailBody(ref mailmsg, lblContactPhoneNumber.InnerHtml, contactphoneAreacode.Text + "-" + contactphonePrefix.Text + "-" + contactphoneSuffix.Text);
        AddRowToEmailBody(ref mailmsg, lblContactEmail.InnerHtml, contactEmail.Text);
        AddRowToEmailBody(ref mailmsg, lblCompassLearningContact.InnerHtml, txtCompassLearningContact.Text);
 
        mailmsg.Body += "<br /><b>Technical Contact Information</b><br />";
 
        if (cbDuplicateContactInfo.Visible == true) AddRowToEmailBody(ref mailmsg, lblDuplicateContactInfo.InnerHtml, cbDuplicateContactInfo.Checked.ToString());
        if (cbDuplicateContactInfo.Checked == false)
        {
            if (txtTechContactName.Visible == true) AddRowToEmailBody(ref mailmsg, Label1.InnerHtml, txtTechContactName.Text);
            if (techcontactphoneAreacode.Visible == true) AddRowToEmailBody(ref mailmsg, Label3.InnerHtml, techcontactphoneAreacode.Text + "-" + techcontactphonePrefix.Text + "-" + techcontactphoneSuffix.Text);
            if (techcontactAlternateAreacode.Visible == true) AddRowToEmailBody(ref mailmsg, Label4.InnerHtml, techcontactAlternateAreacode.Text + "-" + techcontactAlternatePrefix.Text + "-" + techcontactAlternateSuffix.Text);
            if (txtTechContactEmail.Visible == true) AddRowToEmailBody(ref mailmsg, lblTechContactEmail.InnerHtml, txtTechContactEmail.Text);
        }
 
        mailmsg.Body += "<br /><b>Site Information</b><br />";
 
        if (valrISPConnectionSpeed.Enabled == true) AddRowToEmailBody(ref mailmsg, lblISPConnectionSpeed.InnerHtml, txtISPConnectionSpeed.Text);
        if (valrWANConnectionSpeed.Enabled == true) AddRowToEmailBody(ref mailmsg, lblWANConnectionSpeed.InnerHtml, txtWANConnectionSpeed.Text);
        if (valrLANConnectionSpeed.Enabled == true) AddRowToEmailBody(ref mailmsg, lblLANConnectionSpeed.InnerHtml, txtLANConnectionSpeed.Text);
 
        if (valrWirelessConnection.Enabled == true) AddRowToEmailBody(ref mailmsg, lblWirelessConnection.InnerHtml, rbnWirelessConnection.SelectedItem.Text);
        if (valrDirectConnection.Enabled == true) AddRowToEmailBody(ref mailmsg, lblDirectConnection.InnerHtml, rbnDirectConnection.SelectedItem.Text);
        if (valrTotalConcurrentUsers.Enabled == true) AddRowToEmailBody(ref mailmsg, lblTotalConcurrentUsers.InnerHtml, txtTotalConcurrentUsers.Text);
        if (valrK8ConcurrentUsers.Enabled == true) AddRowToEmailBody(ref mailmsg, lblK8ConcurrentUsers.InnerHtml, txtK8ConcurrentUsers.Text);
        if (valrHSAPConcurrentUsers.Enabled == true) AddRowToEmailBody(ref mailmsg, lblHSAPConcurrentUsers.InnerHtml, txtHSAPConcurrentUsers.Text);
        if (valrCachingServer.Enabled == true) AddRowToEmailBody(ref mailmsg, lblCachingServer.InnerHtml, rbnCachingServer.SelectedItem.Text);
        if (valrBandwidthUtilization.Enabled == true) AddRowToEmailBody(ref mailmsg, lblBandwidthUtilization.InnerHtml, rbnBandwidthUtilization.SelectedItem.Text);
        
        if (valrNetworkDiagram.Enabled == true) AddRowToEmailBody(ref mailmsg, lblNetworkDiagram.InnerHtml, rbnNetworkDiagram.SelectedItem.Text);
        if (valrServerRequirements.Enabled == true) AddRowToEmailBody(ref mailmsg, lblServerRequirements.InnerHtml, rbnServerRequirements.SelectedItem.Text);
        if (valrWorkstationRequirements.Enabled == true) AddRowToEmailBody(ref mailmsg, lblWorkstationRequirements.InnerHtml, rbnWorkstationRequirements.SelectedItem.Text);
 
        mailmsg.Body += "</div>";   
        
  
        //Send Email
        SendMail.Send(mailmsg, null);
    }
 
    protected void AddRowToEmailBody(ref System.Net.Mail.MailMessage mailmsg, string label, string field)
    {
        mailmsg.Body += "<i>" + label.Replace("<br />", "") + "</i>&nbsp;&nbsp;<b>" + field + "</b><br />";
    }
 
    protected void valxContactPhoneNumber_ServerValidate(object source, ServerValidateEventArgs args)
    {
        String areacodeRegex = "\\d{3}";
        String prefixRegex = "\\d{3}";
        String suffixRegex = "\\d{4}";
        if ((!Regex.IsMatch(contactphoneAreacode.Text, areacodeRegex)
                    || (!Regex.IsMatch(contactphonePrefix.Text, prefixRegex) || (!Regex.IsMatch(contactphoneSuffix.Text, suffixRegex)))))
        {
            args.IsValid = false;
            lblContactPhoneNumber.Attributes.CssStyle.Add("display", "none");
        }
        else
        {
            args.IsValid = true;
            lblContactPhoneNumber.Attributes.Clear();
        }
    }
 
    protected void cbDuplicateContactInfo_CheckedChanged(object sender, EventArgs e)
    {
        if (cbDuplicateContactInfo.Checked)
        {
            pnlTechContact.Visible = false;
        }
    }
 
    /// <summary>
    /// Remove special chars from a string
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    public static string RemoveSpecialChars(string input)
    {
        string result = input;
        string forbidden = "*,(,),',%,{,},&,<strong>,</strong>,<span class=\"required\">,</span>,#8224;,<br />,:";
        string[] tmp = forbidden.Split(new char[] { ',' });
        for (int i = 0; i <= tmp.Length - 1; i++)
        {
            result = result.Replace(tmp[i].ToString(), "");
        }
        return result;
    }
 
    private DataTable CreateDataTable()
    {
        DataTable myDataTable = new DataTable();
 
        DataColumn myDataColumn;
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Site Name";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "ISP";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "WAN";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "LAN";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Workstations connect wirelessly?";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Direct connection to ISP?";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Total On-Site";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Using K-8";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Using HS/AP";
        myDataTable.Columns.Add(myDataColumn);
 
        myDataColumn = new DataColumn();
        myDataColumn.DataType = Type.GetType("System.String");
        myDataColumn.ColumnName = "Caching Server at site?";
        myDataTable.Columns.Add(myDataColumn);
 
        return myDataTable;
    }
 
 
    private void AddDataToTable(string sitename, string ISP, string WAN, string LAN, string wireless, string directConnection, string onsite, string k8, string ap, string cachingServer, DataTable myTable)
    {
        DataRow row;
 
        row = myTable.NewRow();
 
        row["Site Name"] = sitename;
        row["ISP"] = ISP;
        row["WAN"] = WAN;
        row["LAN"] = LAN;
        row["Workstations connect wirelessly?"] = wireless;
        row["Direct Connection to ISP?"] = directConnection;
        row["Total On-Site"] = onsite;
        row["Using K-8"] = k8;
        row["Using HS/AP"] = ap;
        row["Caching Server at site?"] = cachingServer;
 
        myTable.Rows.Add(row);
    }
 
    protected void gvSiteInfo_RowCreated(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Header)
        {
            GridViewRow row = new GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal);
            Table t = (Table)gvSiteInfo.Controls[0];
 
            // Adding Cells
            TableCell SiteName = new TableHeaderCell();
            SiteName.ColumnSpan = 1;
            SiteName.Width = 150;
            row.Cells.Add(SiteName);
 
            TableCell connectionSpeed = new TableHeaderCell();
            connectionSpeed.ColumnSpan = 3; // ********
            connectionSpeed.Text = "Connection Speed";
            connectionSpeed.Width = 150;
            row.Cells.Add(connectionSpeed);
 
            TableCell wireless = new TableHeaderCell();
            wireless.ColumnSpan = 1;
            wireless.Width = 75;
            row.Cells.Add(wireless);
 
            TableCell directConnection = new TableHeaderCell();
            directConnection.ColumnSpan = 1;
            directConnection.Width = 75;
            row.Cells.Add(directConnection);
 
            TableCell concurrentUsers = new TableHeaderCell();
            concurrentUsers.ColumnSpan = 3; // ********
            concurrentUsers.Text = "# Concurrent Users";
            concurrentUsers.Width = 225;
            row.Cells.Add(concurrentUsers);
 
            TableCell cachingServer = new TableHeaderCell();
            cachingServer.ColumnSpan = 1; // ********
            cachingServer.Width = 75;
            row.Cells.Add(cachingServer);
 
            t.Rows.AddAt(0, row);
        }
    }
 
    protected void btnAddSiteInfo_Click(object sender, EventArgs e)
    {
        pnlSiteInfo.Visible = true;
        //pnlAddSiteInfo.Visible = true;
        this.ModalPopupExtender1.Show();
    }
 
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        pnlSiteInfo.Visible = true;
        this.ModalPopupExtender1.Show();
 
        EnableModalValidators(true);
        Page.Validate();
 
        if (Page.IsValid)
        {
            AddDataToTable(txtSite.Text.Trim(), txtISPConnectionSpeed.Text.Trim(),
                txtWANConnectionSpeed.Text.Trim(), txtLANConnectionSpeed.Text.Trim(),
                rbnWirelessConnection.SelectedItem.Text.ToString(),
                rbnDirectConnection.SelectedItem.Text.ToString(),
                txtTotalConcurrentUsers.Text.Trim(), txtK8ConcurrentUsers.Text.Trim(),
                txtHSAPConcurrentUsers.Text.Trim(), rbnCachingServer.SelectedItem.Text.ToString(),
                (DataTable)Session["myDataTable"]);
 
            this.gvSiteInfo.DataSource = ((DataTable)Session["myDatatable"]).DefaultView;
            this.gvSiteInfo.DataBind();
 
            this.txtSiteName.Text = "";
            this.txtISPConnectionSpeed.Text = "";
            this.txtWANConnectionSpeed.Text = "";
            this.txtLANConnectionSpeed.Text = "";
            this.rbnWirelessConnection.ClearSelection();
            this.rbnDirectConnection.ClearSelection();
            this.txtTotalConcurrentUsers.Text = "";
            this.txtK8ConcurrentUsers.Text = "";
            this.txtHSAPConcurrentUsers.Text = "";
            this.rbnCachingServer.ClearSelection();
        }
        else
        {
            ValidateControls();
        }
    }
}
 
	    
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
847:
848:
849:
850:
851:
852:
853:
854:
855:
856:
857:
858:
859:
860:
861:
862:
863:
864:
865:
866:
867:
868:
869:
870:
871:
872:
873:
874:
875:
876:
877:
878:
879:
880:
881:
882:
883:
884:
885:
886:
887:
888:
889:
890:
891:
892:
893:
894:
895:
896:
897:
898:
899:
900:
901:
902:
903:
904:
905:
906:
907:
908:
909:
910:
911:
912:
913:
914:
915:
916:
917:
918:
919:
920:
921:
922:
923:
924:
925:
926:
927:
928:
929:
930:
931:
932:
933:
934:
935:
936:
937:
938:
939:
940:
941:
942:
943:
944:
945:
946:
947:
948:
949:
950:
951:
952:
953:
954:
955:
956:
957:
958:
959:
960:
961:
962:
963:
964:
965:
966:
967:
968:
969:
970:
971:
972:
973:
974:
975:
976:
977:
978:
979:
980:
981:
982:
983:
984:
985:
986:
987:
988:
989:
990:
991:
992:
993:
994:
995:
996:
997:
998:
999:
1000:
1001:
1002:
1003:
1004:
1005:
1006:
1007:
1008:
1009:
1010:
1011:
1012:
1013:
1014:
1015:
1016:
1017:
1018:
1019:
1020:
1021:
1022:
1023:
1024:
1025:
1026:
1027:
1028:
1029:
1030:
1031:
1032:
1033:
1034:
1035:
1036:
1037:
1038:
1039:
1040:
1041:
1042:
1043:
1044:
1045:
1046:
1047:
1048:
1049:
1050:
1051:
1052:
1053:
1054:
1055:
1056:
1057:
1058:
1059:
1060:
1061:
1062:
1063:

Select allOpen in new window

 

by: -Dman100-Posted on 2009-10-01 at 07:56:37ID: 25469387

Hi sksJegadeesh,

I finally got it working this morning.  It was a combination of several things.  I added a close button click event for the button in the modal popup and rebound the gridview to the datatable in session and added an else condition in the page load where I check if (!Page.IsPostBack) and rebound the gridview to the datatable in session and finally removed the panel around the gridview so it shows at all times.  That got it working.

Thanks for your help yesterday.  I sincerely appreciate it.
Regards.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...