Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
AnswerRe: Recommendations on VB.Net to C# code conversion tool Pin
Richard MacCutchan26-Sep-14 21:27
mveRichard MacCutchan26-Sep-14 21:27 
AnswerRe: Recommendations on VB.Net to C# code conversion tool Pin
Ravi Bhavnani28-Sep-14 4:17
professionalRavi Bhavnani28-Sep-14 4:17 
AnswerRe: Recommendations on VB.Net to C# code conversion tool Pin
Simon_Whale28-Sep-14 8:29
Simon_Whale28-Sep-14 8:29 
AnswerRe: Recommendations on VB.Net to C# code conversion tool Pin
Sibeesh KV29-Sep-14 19:10
professionalSibeesh KV29-Sep-14 19:10 
Questionhow to assign listbox value to datagridview in c# Pin
Member 413595226-Sep-14 5:06
Member 413595226-Sep-14 5:06 
AnswerRe: how to assign listbox value to datagridview in c# Pin
Eddy Vluggen26-Sep-14 5:51
professionalEddy Vluggen26-Sep-14 5:51 
AnswerRe: how to assign listbox value to datagridview in c# Pin
ChintanShukla29-Sep-14 23:22
professionalChintanShukla29-Sep-14 23:22 
QuestionNeither validators nor Validationsummery is working Pin
demoninside926-Sep-14 0:50
demoninside926-Sep-14 0:50 
Hi all,

I am wondering that on my form nither validators nor Validationsummery is working. why? below is my code.

<pre lang="HTML"><table align="center" border="0" cellpadding="0" cellspacing="0" width="700">
<tr>
<td align="center" class="formHeading">
Add a New User</td>
</tr>
<tr>
<td align="center" style="height: 20px">
&nbsp;</td>
</tr>
<tr>
<td align="left" style="height: 20px" class="nbdcontent">
&nbsp;&nbsp; </td>
</tr>
<tr>
<td align="center" style="height: 20px">
&nbsp;
</td>
</tr>
<tr>
<td>

<table border="0" cellpadding="0" cellspacing="0" width="700">
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> &nbsp;</td>
<td align="left" class="nbdcontent" style="height: 17px" valign="top" colspan="5">
<asp:Label ID="lblMsg" runat="server" Font-Bold="True" Visible="False"></asp:Label>
</td>
<td align="left" height: 17px;" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px;">
&nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> &nbsp;</td>
<td align="left" class="nbdcontent" style="height: 17px" valign="top" colspan="5">
&nbsp;</td>
<td align="left" height: 17px;" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px;">
&nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> &nbsp;</td>
<td align="left" class="nbdcontent" style="height: 17px" valign="top" colspan="5">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" CssClass="nbdcontent"
AutoPostBack="True" RepeatDirection="Horizontal" Font-Bold="True"
Font-Size="Medium"
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
<asp:ListItem Value="0">CPMU</asp:ListItem>
<asp:ListItem Value="1">SPMU</asp:ListItem>
<asp:ListItem Value="2">SFTI</asp:ListItem>
</asp:RadioButtonList>
</td>
<td align="left" height: 17px;" valign="top" colspan="2">
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="RadioButtonList1" ErrorMessage="Type required !">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> &nbsp;</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
&nbsp;</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">
&nbsp;</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">&nbsp;</td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top">&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
&nbsp;</td>
<td align="left" height: 17px;" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px;">
&nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;">&nbsp; </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> State</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">
<asp:DropDownList ID="ddlStates" runat="server" AutoPostBack="True"
CssClass="mytextbox"
AppendDataBoundItems="True" DataTextField="State"
DataValueField="State_Id" Enabled="False"
onselectedindexchanged="ddlStates_SelectedIndexChanged1">
<asp:ListItem Value="0">-Select-</asp:ListItem>

</asp:DropDownList>
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">&nbsp;</td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top">&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
&nbsp;</td>
<td align="left" height: 17px;" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px;">
</td>
</tr>
<tr style="color: #000000">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 17px;">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> &nbsp;</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
&nbsp;</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">
&nbsp;</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">&nbsp;</td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top">&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
&nbsp;</td>
<td align="left" height: 17px;" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px;">
&nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp; </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> SFTI</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:DropDownList ID="ddlSFTI" runat="server" AutoPostBack="True"
CssClass="mytextbox" DataTextField="SFTI_Name"
DataValueField="SFTI_Id" Enabled="False">
<asp:ListItem Value="0">-Select-</asp:ListItem>

</asp:DropDownList>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> </td>
<td style="width: 100px; height: 17px" valign="top">
</td>
<td style="width: 100px; height: 17px"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> &nbsp;</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
&nbsp;</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:Label ID="lblUserId" runat="server" Visible="False"></asp:Label>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> &nbsp;</td>
<td style="width: 100px; height: 17px" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px"> &nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> User Id</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:TextBox ID="txtUserId" runat="server" CssClass="mytextbox"
AutoPostBack="True" ontextchanged="txtUserId_TextChanged"></asp:TextBox>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtUserId" ErrorMessage="User Id Required !">*</asp:RequiredFieldValidator>
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> &nbsp;</td>
<td style="width: 100px; height: 17px" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px"> &nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> &nbsp;</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
&nbsp;</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
&nbsp;</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> &nbsp;</td>
<td style="width: 100px; height: 17px" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px"> &nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> Email</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:TextBox ID="txtEmail" runat="server" CssClass="mytextbox"
></asp:TextBox>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="txtEmail" ErrorMessage="Email is not valid !"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> &nbsp;</td>
<td style="width: 100px; height: 17px" valign="top">
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="txtEmail" ErrorMessage="Email required !">*</asp:RequiredFieldValidator>
</td>
<td style="width: 100px; height: 17px"> &nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> &nbsp;</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
&nbsp;</td>
<td align="left" colspan="6" style="height: 17px" valign="top">
<asp:RegularExpressionValidator ID="Regex2" runat="server" ControlToValidate="txtpassword"
ValidationExpression="^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"
ErrorMessage="Minimum 8 characters atleast 1 Alphabet, 1 Number and 1 Special Character"
ForeColor="Red" Display="Dynamic" /></td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> Password</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:TextBox ID="txtpassword" runat="server" CssClass="mytextbox"
TextMode="Password" onchange="ToggleButton();" ></asp:TextBox>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtpassword" ErrorMessage="Password Required !">*</asp:RequiredFieldValidator>
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> &nbsp;</td>
<td style="width: 100px; height: 17px" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px"> &nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> &nbsp;</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
&nbsp;</td>
<td align="left" colspan="6" style="height: 17px" valign="top">
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="txtpassword" ControlToValidate="txtConfirmpassword"
ErrorMessage="Confirmed Password did not match"></asp:CompareValidator>
</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> Password Confirmed</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
:</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:TextBox ID="txtConfirmpassword" runat="server" CssClass="mytextbox"
TextMode="Password" onchange="ToggleButton();" ></asp:TextBox>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtConfirmpassword"
ErrorMessage="Confirmed Password Required !">*</asp:RequiredFieldValidator>
</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px"> &nbsp;</td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px">&nbsp;</td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> &nbsp;</td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
&nbsp;</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Submit" />
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
17px" valign="top"> &nbsp;</td>
<td style="width: 100px; height: 17px" valign="top">
&nbsp;</td>
<td style="width: 100px; height: 17px"> &nbsp;</td>
</tr>
<tr>
<td style="width: 9px; height: 19px;" class="nbdcontent">&nbsp; </td>
<td style="width: 141px; height: 19px;" class="nbdcontent" valign="top">
&nbsp;</td>
<td style="height: 19px;" align="center" class="nbdcontent" valign="top">
&nbsp;</td>
<td style="height: 19px;" valign="top" colspan="6">
<asp:RegularExpressionValidator ID="Regex3" runat="server" ControlToValidate="txtConfirmpassword"
ValidationExpression="^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"
ErrorMessage="Minimum 8 characters atleast 1 Alphabet, 1 Number and 1 Special Character"
ForeColor="Red" Display="Dynamic" /></td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
&nbsp;</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
&nbsp;</td>
<td align="left" style="height: 18px" valign="top">
&nbsp;</td>
<td align="left" style="height: 18px" valign="top">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap"
style="height: 18px"
valign="top">&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
18px" valign="top">
&nbsp;</td>
<td align="left" valign="top" style="height: 18px">
&nbsp;</td>
<td style="width: 100px; height: 18px">
&nbsp;</td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
&nbsp;</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
&nbsp;</td>
<td align="left" style="height: 18px" valign="top">
&nbsp;</td>
<td align="left" style="height: 18px" valign="top">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap"
style="height: 18px"
valign="top">&nbsp;</td>
<td align="center" class="nbdcontent" style="width: 13px; height:
18px" valign="top">
&nbsp;</td>
<td align="left" valign="top" style="height: 18px">
&nbsp;</td>
<td style="width: 100px; height: 18px">
&nbsp;</td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
&nbsp;</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
&nbsp;</td>
<td align="left" valign="top" colspan="6" rowspan="2">
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
</td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top">&nbsp;</td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
&nbsp;</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
&nbsp;</td>
</tr>
</table>


</td>
</tr>
</table></pre>
AnswerMy Vote of 1 Pin
Keith Barrow26-Sep-14 1:57
professionalKeith Barrow26-Sep-14 1:57 
AnswerRe: Neither validators nor Validationsummery is working Pin
Eddy Vluggen26-Sep-14 5:54
professionalEddy Vluggen26-Sep-14 5:54 
GeneralRe: Neither validators nor Validationsummery is working Pin
demoninside926-Sep-14 19:34
demoninside926-Sep-14 19:34 
GeneralRe: Neither validators nor Validationsummery is working Pin
Richard MacCutchan26-Sep-14 21:38
mveRichard MacCutchan26-Sep-14 21:38 
GeneralRe: Neither validators nor Validationsummery is working Pin
Keith Barrow29-Sep-14 22:37
professionalKeith Barrow29-Sep-14 22:37 
QuestionHo to assign a numbering system to the file system hierarchy Pin
Rick450d25-Sep-14 12:41
Rick450d25-Sep-14 12:41 
JokeRe: Ho to assign a numbering system to the file system hierarchy Pin
PIEBALDconsult25-Sep-14 14:02
mvePIEBALDconsult25-Sep-14 14:02 
GeneralRe: Ho to assign a numbering system to the file system hierarchy Pin
SledgeHammer0125-Sep-14 15:06
SledgeHammer0125-Sep-14 15:06 
AnswerRe: Ho to assign a numbering system to the file system hierarchy PinPopular
Freak3025-Sep-14 22:00
Freak3025-Sep-14 22:00 
SuggestionRe: Ho to assign a numbering system to the file system hierarchy Pin
Richard Deeming26-Sep-14 1:14
mveRichard Deeming26-Sep-14 1:14 
GeneralRe: Ho to assign a numbering system to the file system hierarchy Pin
BillWoodruff26-Sep-14 1:22
professionalBillWoodruff26-Sep-14 1:22 
AnswerRe: Ho to assign a numbering system to the file system hierarchy Pin
BillWoodruff26-Sep-14 1:21
professionalBillWoodruff26-Sep-14 1:21 
QuestionHow to extract VBA code from Excel in Visual Studio and read it as text with c#? Pin
Member 1110881725-Sep-14 0:01
Member 1110881725-Sep-14 0:01 
AnswerRe: How to extract VBA code from Excel in Visual Studio and read it as text with c#? Pin
Eddy Vluggen25-Sep-14 2:19
professionalEddy Vluggen25-Sep-14 2:19 
AnswerRe: How to extract VBA code from Excel in Visual Studio and read it as text with c#? Pin
Chris Quinn25-Sep-14 4:41
Chris Quinn25-Sep-14 4:41 
QuestionRecevoir des mails Pin
Member 1110858924-Sep-14 23:51
Member 1110858924-Sep-14 23:51 
SuggestionRe: Recevoir des mails Pin
George Jonsson25-Sep-14 0:07
professionalGeorge Jonsson25-Sep-14 0:07 

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

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