Rajkamal S

Rajkamal S

  • 1.4k
  • 287
  • 31k

validation

Sep 25 2012 2:39 AM
<asp:MultiView ID="MultiView1" runat="server">
         
     <asp:View ID="View1" runat="server">
     
      <table class="style1" width="100%" style="border-style: groove; border-width: thin">
       <tr style="background: #1d599e; height: 10px;">
            <td align="center" style="color:White" colspan="2">
                PROJECT STATUS</td>
                </tr>
          <tr>
              <td align="center" colspan="2">
                  <asp:Label ID="Label4" runat="server" style="font-size: 13px" 
                      Text="Choose ProjectName to view the Status of the project"></asp:Label>
              </td>
              
          </tr>
        <tr>
            <td class="style10">
               <asp:Label ID="Label11" runat="server" style="font-size: 11px" 
                    Text="Date"></asp:Label> &nbsp;</td>
            <td>
                <asp:TextBox ID="TextBox8" runat="server" Height="15px" Width="175px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="TextBox8" ErrorMessage="Enter the Date" 
                    ValidationGroup="a" style="font-size: 12px"></asp:RequiredFieldValidator>
            </td>
        </tr>
        
        
        <tr>
        <td class="style14">
            <asp:Label ID="lempid" runat="server" style="font-size:11px" Text="Employee Id"></asp:Label>
        
        </td>
        
        
        <td class="style14">
            <asp:Label ID="lemid" runat="server" Text=""></asp:Label>
        
        </td>
        
        </tr>
        
        
       
        
        
        
        
        
        <tr>
        <td class="style10">
       <asp:Label ID="Label12" runat="server" style="font-size: 11px" 
                    Text="Name"></asp:Label> &nbsp;</td> 
      
        
        <td>
        <asp:TextBox ID="TextBox9" runat="server" Height="15px" Width="175px"></asp:TextBox>
        
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="TextBox9" ErrorMessage="Enter Your Name" 
                SetFocusOnError="True" ValidationGroup="a" style="font-size: small"></asp:RequiredFieldValidator>
        
        </td>
        
        
        
        </tr>
        
        
        
        
        
        
        
        
        
        
        <tr>
            <td class="style10">
                <asp:Label ID="Label2" runat="server" style="font-size: 11px" 
                    Text="Project"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="DropDownList6" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="DropDownList6_SelectedIndexChanged" Width="175px"   
                    ValidationGroup="a">
                    <asp:ListItem Value="0">Select</asp:ListItem>
                    <asp:ListItem Value="1">New</asp:ListItem>
                    <asp:ListItem Value="2">Continuing</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="DropDownList6" ErrorMessage="Select your Project" 
                    InitialValue="0" V style="font-size: small"></asp:RequiredFieldValidator>
            </td>
        </tr>
          
          
          
          </table>
     </asp:View>
     
         <asp:View ID="View2" runat="server">
             <table class="style1" style="border-style: groove; border-width: thin" 
                 width="100%">
                 <tr style="background: #1d599e; height: 10px;">
                     <td align="center" class="style4" colspan="2" style="color:White">
                         PROJECT STATUS</td>
                 </tr>
                 <tr>
                     <td align="center" class="style13">
                         </td>
                     <td class="style14">
                     </td>
                 </tr>
                 <tr>
                     <td align="center" class="style5" colspan="2">
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                         <asp:Label ID="Label3" runat="server" style="font-size: 12px; color: #666666;" 
                             Text="Project Status has been given below"></asp:Label>
                     </td>
                     <td>
                     </td>
                 </tr>
                 <tr>
                     <td class="style9">
                         <asp:Label ID="Label5" runat="server" style="font-size:11px;" 
                             Text="Project Name"></asp:Label>
                     </td>
                     <td>
                         <asp:TextBox ID="TextBox1" runat="server" Height="15px" Width="175px"></asp:TextBox>
                     </td>
                 </tr>
                 <tr>
                     <td class="style6">
                         <asp:Label ID="Label6" runat="server" style="font-size:11px;" Text="Description"></asp:Label>
                         <br />
                     </td>
                     <td class="style7">
                         <asp:TextBox ID="TextBox2" runat="server" Height="15px" Width="175px"></asp:TextBox>
                     </td>
                 </tr>
                 <tr>
                     <td class="style9">
                         <asp:Label ID="Label7" runat="server" style="font-size:11px;" Text="Duration"></asp:Label>
                         <br />
                     </td>
                     <td>
                         <asp:TextBox ID="TextBox3" runat="server" Height="15px" Width="175px"></asp:TextBox>
                     </td>
                 </tr>
                 <tr>
                     <td class="style9">
                         <asp:Label ID="Label8" runat="server" style="font-size:11px;" Text="Platform"></asp:Label>
                         <br />
                     </td>
                     <td>
                         <asp:TextBox ID="TextBox4" runat="server" Height="15px" Width="175px"></asp:TextBox>
                     </td>
                 </tr>
                 <tr>
                     <td class="style9">
                     <asp:Label ID="Label13" runat="server" style="font-size:11px;" Text="Task"></asp:Label>
                         &nbsp;</td>
                         
                         <td>
                         
                             <asp:DropDownList ID="DropDownList5" runat="server" AutoPostBack="True" 
                                 Height="21px" onselectedindexchanged="DropDownList5_SelectedIndexChanged" 
                                 Width="183px">
                                 <asp:ListItem Value="0">Select</asp:ListItem>
                                 <asp:ListItem Value="1">New</asp:ListItem>
                                 <asp:ListItem Value="2">Continuing</asp:ListItem>
                             </asp:DropDownList>
                         
                         
                         </td>
                         
                         
                 </tr>
                 
                 
                 <tr>
                 
                 <td>
                     &nbsp;</td>
                 <td>
                    
                     &nbsp;</td>
                 </tr>
                 
                 
                 
             </table>
         </asp:View>
         <asp:View ID="View3" runat="server">
             <table class="style1" style="border-style: groove; border-width: thin" 
                 width="100%">
                 <tr style="background: #1d599e;">
                     <td align="center" class="style8" colspan="2" style="color:White">
                         PROJECT STATUS</td>
                 </tr>
                 
                 <tr>
                 <td class="style12">
                 
                 </td>
                 
                 <td>
                 
                 </td>
                 
                 </tr>
                 
                 
                 
                 
                 <tr>
                     <td class="style11">
                         <asp:Label ID="Label9" runat="server" style="font-size:11px;" 
                             Text="Project Title"></asp:Label>
                     </td>
                     <td>
                         <asp:TextBox ID="TextBox5" runat="server" Height="15px" Width="175px"></asp:TextBox>
                     </td>
                 </tr>
                 <tr>
                     <td class="style11">
                         <asp:Label ID="Label10" runat="server" style="font-size:11px;" 
                             Text="Project Module"></asp:Label>
                     </td>
                     <td>
                         <asp:TextBox ID="TextBox6" runat="server" Height="15px" Width="175px"></asp:TextBox>
                     </td>
                 </tr>
                 <tr>
                     <td class="style11">
                         <asp:Label ID="Label1" runat="server" style="font-size: 11px;" Text="TaskName"></asp:Label>
                     </td>
                     <td>
                         <asp:TextBox ID="TextBox7" runat="server" Height="15px" Width="175px"></asp:TextBox>
                     </td>
                 </tr>
                 <tr>
                     <td align="left" class="style12">
                         <asp:Label ID="Label14" runat="server" style="font-size:11px;" Text="Status"></asp:Label>
                     </td>
                     <td>
                     
                         <asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True" 
                             Height="21px" onselectedindexchanged="DropDownList4_SelectedIndexChanged" 
                             Width="166px">
                             <asp:ListItem Value="0">select</asp:ListItem>
                             <asp:ListItem Value="1">Completed</asp:ListItem>
                             <asp:ListItem Value="2">Pending</asp:ListItem>
                         </asp:DropDownList>
                     
                     </td>
                 </tr>
                 
                 
                 
                 
                 
                 
              <tr>
                     <td align="left" class="style12">
                         <asp:Label ID="Label15" runat="server" style="font-size:11px;" Text="Pending"></asp:Label>
                     </td>
                     <td>
                      <asp:TextBox ID="TextBox10" runat="server" Height="16px" Width="117px" 
                             TextMode="MultiLine"></asp:TextBox>
                        
                     </td>
                 </tr>
                 
                 
                     
                 
                 
                 
                 
                 
                 
                 
                 <tr>
                     <td align="center" class="style12">
                         <asp:Label ID="lpjtd" runat="server" style="font-size:11px;" Text=""></asp:Label>
                         <asp:Button ID="Button4" runat="server" onclick="Button4_Click" Text="Button" />
                     </td>
                 </tr>
             </table>
         </asp:View>
     
 </asp:MultiView>

how to give validation to this form..









Answers (3)