|
Of course it is a callvirt! However C# always uses callvirt when calling instance methods! So other there is no difference between the two...
Take this code for instance:
using System.Diagnostics;
namespace ConsoleApplication1
{
class Program
{
static void Main ( string[ ] args )
{
BaseClass baseClass = new BaseClass( );
DerivedClass1 derivedClass1 = new DerivedClass1( );
DerivedClass2 derivedClass2 = new DerivedClass2( );
invokeClassMethod( baseClass );
invokeClassMethod( derivedClass1 );
invokeClassMethod( derivedClass2 );
BaseClassD baseClassD = new BaseClassD( );
DerivedClass1D derivedClass1D = new DerivedClass1D( );
DerivedClass2D derivedClass2D = new DerivedClass2D( );
invokeClassMethodD( baseClassD );
invokeClassMethodD( derivedClass1D );
invokeClassMethodD( derivedClass2D );
}
static private void invokeClassMethod ( BaseClass theClass )
{
theClass.ShowMe( );
}
static private void invokeClassMethodD ( BaseClassD theClass )
{
theClass.ShowMe( );
}
}
public class BaseClass
{
public virtual void ShowMe ( )
{
Debug.WriteLine( "BaseClass" );
}
}
public class DerivedClass1 : BaseClass
{
public override void ShowMe ( )
{
Debug.WriteLine( "DerivedClass1" );
}
}
public class DerivedClass2 : BaseClass
{
public override void ShowMe ( )
{
Debug.WriteLine( "DerivedClass2" );
}
}
public class BaseClassD
{
public void ShowMe ( )
{
Debug.WriteLine( "BaseClass" );
}
}
public class DerivedClass1D : BaseClassD
{
public void ShowMe ( )
{
Debug.WriteLine( "DerivedClass1" );
}
}
public class DerivedClass2D : BaseClassD
{
public void ShowMe ( )
{
Debug.WriteLine( "DerivedClass2" );
}
}
}
And see the IL code for the same:
1 .class private auto ansi beforefieldinit ConsoleApplication1.Program
2 extends [mscorlib]System.Object
3 {
4
5 .method private hidebysig static
6 void Main (
7 string[] args
8 ) cil managed
9 {
10
11
12 .maxstack 1
13 .entrypoint
14 .locals init (
15 [0] class ConsoleApplication1.BaseClass baseClass,
16 [1] class ConsoleApplication1.DerivedClass1 derivedClass1,
17 [2] class ConsoleApplication1.DerivedClass2 derivedClass2,
18 [3] class ConsoleApplication1.BaseClassD baseClassD,
19 [4] class ConsoleApplication1.DerivedClass1D derivedClass1D,
20 [5] class ConsoleApplication1.DerivedClass2D derivedClass2D
21 )
22
23 IL_0000: nop
24 IL_0001: newobj instance void ConsoleApplication1.BaseClass::.ctor()
25 IL_0006: stloc.0
26 IL_0007: newobj instance void ConsoleApplication1.DerivedClass1::.ctor()
27 IL_000c: stloc.1
28 IL_000d: newobj instance void ConsoleApplication1.DerivedClass2::.ctor()
29 IL_0012: stloc.2
30 IL_0013: ldloc.0
31 IL_0014: call void ConsoleApplication1.Program::invokeClassMethod(class ConsoleApplication1.BaseClass)
32 IL_0019: nop
33 IL_001a: ldloc.1
34 IL_001b: call void ConsoleApplication1.Program::invokeClassMethod(class ConsoleApplication1.BaseClass)
35 IL_0020: nop
36 IL_0021: ldloc.2
37 IL_0022: call void ConsoleApplication1.Program::invokeClassMethod(class ConsoleApplication1.BaseClass)
38 IL_0027: nop
39 IL_0028: newobj instance void ConsoleApplication1.BaseClassD::.ctor()
40 IL_002d: stloc.3
41 IL_002e: newobj instance void ConsoleApplication1.DerivedClass1D::.ctor()
42 IL_0033: stloc.s derivedClass1D
43 IL_0035: newobj instance void ConsoleApplication1.DerivedClass2D::.ctor()
44 IL_003a: stloc.s derivedClass2D
45 IL_003c: ldloc.3
46 IL_003d: call void ConsoleApplication1.Program::invokeClassMethodD(class ConsoleApplication1.BaseClassD)
47 IL_0042: nop
48 IL_0043: ldloc.s derivedClass1D
49 IL_0045: call void ConsoleApplication1.Program::invokeClassMethodD(class ConsoleApplication1.BaseClassD)
50 IL_004a: nop
51 IL_004b: ldloc.s derivedClass2D
52 IL_004d: call void ConsoleApplication1.Program::invokeClassMethodD(class ConsoleApplication1.BaseClassD)
53 IL_0052: nop
54 IL_0053: ret
55 }
56
57 .method private hidebysig static
58 void invokeClassMethod (
59 class ConsoleApplication1.BaseClass theClass
60 ) cil managed
61 {
62
63
64 .maxstack 8
65
66 IL_0000: nop
67 IL_0001: ldarg.0
68 IL_0002: callvirt instance void ConsoleApplication1.BaseClass::ShowMe()
69 IL_0007: nop
70 IL_0008: ret
71 }
72
73 .method private hidebysig static
74 void invokeClassMethodD (
75 class ConsoleApplication1.BaseClassD theClass
76 ) cil managed
77 {
78
79
80 .maxstack 8
81
82 IL_0000: nop
83 IL_0001: ldarg.0
84 IL_0002: callvirt instance void ConsoleApplication1.BaseClassD::ShowMe()
85 IL_0007: nop
86 IL_0008: ret
87 }
88
89 .method public hidebysig specialname rtspecialname
90 instance void .ctor () cil managed
91 {
92
93
94 .maxstack 8
95
96 IL_0000: ldarg.0
97 IL_0001: call instance void [mscorlib]System.Object::.ctor()
98 IL_0006: ret
99 }
100
101 }
See line 68 and 84 - both have callvirt event the second is not a virtual member...
I also found this...http://blogs.msdn.com/b/ericgu/archive/2008/07/02/why-does-c-always-use-callvirt.aspx[^]
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
hi,
I want to execute mutiple sql select queries in ms access using c#. As per my knowledge what we can do with sql server, is we can separate the queries using semi colon (;) like [select * from table1 ; select * from table2] and we can fill mutiple data tables within a dataset with the help of data adapter. is there any way we can do the same in ms access.
we can not create stored procedures too in ms access so what is the way to populate multiple data tables in one go, by sending / executing multiple queries in ms access.
Thanks in advance
|
|
|
|
|
Not sure if this is the right place, but I didn't see any more appropriate place, so...
Is it possible to validate attributes with xsd?
For example (a slightly contrived example, but you'll get the idea):
<host ipAddr="" hostName="" />
Does not make any sense to have both ipAddr and hostname specified.
A google search seems to indicate that you might not be able to do this, but it seems like Visual Studio does it on XSD itself. If I specify xs:element with both ref and name, it'll tell me ref is not allowed.
I want to do exactly that.
|
|
|
|
|
|
As stated in another comment, this question belongs to XML/XSL.
It is not clear exactly what you want to do.
Do you want tot have two attributes that is mutual exclusive, so either ipAddr or hostName is present but not both?
|
|
|
|
|
Yeah. In my original post, I said it doesn't make sense to have both.
|
|
|
|
|
In this particular case you should not need to use two attributes, it should be sufficient with one.
You could use the Dns.GetHostEntry Method[^]
System.Net.IPHostEntry host = null;
host = System.Net.Dns.GetHostEntry("127.0.0.1");
host = System.Net.Dns.GetHostEntry("localhost");
However, your question was interesting so I did some quick research and it looks like XML Schema 1.1[^] might have what you need.
Unfortunately .Net doesn't yet support this version.
|
|
|
|
|
I did say in my original post that this was a contrived example, but it certainly wouldn't make sense to specify:
<host ip="237.152.11.17" name="localhost" />
because that's obviously not correct. In my less contrived example:
<Item minLevel="1" maxLevel="2" />
<Item levels="1,3,5" />
it doesn't make sense to allow:
<Item minLevel="1" maxLevel="2" levels="1,3,5" />
because min and max go together, but levels allows you to specify arbitrary levels.
|
|
|
|
|
Then I think you have to do your validation in code behind.
I was considering using xs:union, but that doesn't work in your case with three attributes.
It could work if you only have two attributes.
See xsd:union[^]
|
|
|
|
|
I looked at the link for union... looks kinda dumb imo... not you, I mean, the union command itself. Its just a more verbose / messier form of regex minus the regex. In the example, it makes your XML take either "54" or small, medium or large. But in the process, it adds ugly namespaces to your XML. Would be cleaner using the regex pattern. Ugh... from what I see, Microsoft has no intention of adding XSD 1.1 support to .NET. Assert would have done it. Oh well... guess I'll have to make the 3 params optional and validate it in the C#. Equally ugly.
Kinda weird that XSD manages to do it on itself. Is that like hardcoded in the validator or something?
If you put:
<xs:element name="blah" ref="blah2" />
Visual Studio will bitch at you that 'ref' cannot be present.
|
|
|
|
|
Maybe it is the example that is stupid, but I have never used union myself so I cannot offer anything better.
I guess it is XSD.exe that bitches about a mix of the attributes name and ref, not the schema itself.
But I get what you mean.
It would be nice if Microsoft supported this in the next .Net version. I have had cases where I wanted to check if a value where between min and max directly in the schema.
MS doesn't support XSLT 2.0 or XPATH 2.0 either and doesn't seem to have an official implementation plan.
|
|
|
|
|
Huh? You can check if a value is between min & max directly in the schema in quite a few ways.
I quit using XPATH once I discovered LinqToXML. Unless you use XPATH regularly, you spend an awful lot of time screwing around with the cryptic syntax to get what you want.
|
|
|
|
|
We have couple of projects (1 win forms and 1 web form) written in VB.Net. We would like to get those converted into C#. We would be using VS 2012 Professional for BUILD. I am already googling for such tools but would also like to take community's opinion/recommendation on any such highly recommended tools with highest precision/accuracy in converting code from VB.Net to C#. I am good with free and paid tools. Your pointers/suggestions will be highly appreciated.
Thanks in advance.
Regards,
Vipul Mehta
modified 28-Sep-14 7:26am.
|
|
|
|
|
Did you read the description at the top of this forum?
|
|
|
|
|
So under which section would this question fall under?
Regards,
Vipul Mehta
|
|
|
|
|
You could try Quick Answers, but there isn't a section that really caters for such questions.
|
|
|
|
|
|
Also have a look at telrik's just decompile.
Just one thing to note the lambas and events that are assigned to controls in code don't always convert correctly.
So don't rely on them 100%
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
modified 28-Sep-14 18:43pm.
|
|
|
|
|
|
Dear All,
I have list box and datagridview. In my list box contains values like item code and item name, i have to fill select item code in datagridview item code column and item name column from the list box.
I am using c# windows application
Thanks in advance.
|
|
|
|
|
That's not a question, but a task. Start with writing the code to retrieve the value from the listbox. Then write the code to assign a new DataRow.
If you have a more specific question, you'll get a more specific answer.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You can use a for loop and add all the selected values from list box to the DataTable and bind that DataTable to your GridView Control.
Cheers
|
|
|
|
|
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">
</td>
</tr>
<tr>
<td align="left" style="height: 20px" class="nbdcontent">
</td>
</tr>
<tr>
<td align="center" style="height: 20px">
</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;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </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">
</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;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </td>
<td align="left" class="nbdcontent" style="height: 17px" valign="top" colspan="5">
</td>
<td align="left" height: 17px;" valign="top">
</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;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </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;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top"> </td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
</td>
<td align="left" height: 17px;" valign="top">
</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;"> </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"> </td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
</td>
<td align="left" height: 17px;" valign="top">
</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;"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 17px;" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top">
</td>
<td align="left" style="width: 120px; height: 17px;" valign="top"> </td>
<td nowrap="nowrap" style="height: 17px;" align="left"
class="nbdcontent" valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height: 17px" valign="top">
</td>
<td align="left" 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"> </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"> </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"> </td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </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:Label ID="lblUserId" runat="server" Visible="False"></asp:Label>
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top"> </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"> </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"> </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"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</td>
<td align="left" colspan="2" style="width: 120px; height: 17px" valign="top">
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top">
</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"> </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"> </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"> </td>
</tr>
<tr style="color: #000000">
<td align="right" class="nbdcontent" style="width: 9px; height:
17px"> </td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</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"> </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"> </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"> </td>
<td align="left" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </td>
<td align="center" class="nbdcontent" style="height: 17px" valign="top">
</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"> </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">
</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"> </td>
<td align="right" class="nbdcontent" style="width: 141px; height:
17px" valign="top"> </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:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Submit" />
</td>
<td align="left" class="nbdcontent" style="height:
17px" valign="top"> </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>
<td style="width: 9px; height: 19px;" class="nbdcontent"> </td>
<td style="width: 141px; height: 19px;" class="nbdcontent" valign="top">
</td>
<td style="height: 19px;" align="center" class="nbdcontent" valign="top">
</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"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
</td>
<td align="left" style="height: 18px" valign="top">
</td>
<td align="left" style="height: 18px" valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap"
style="height: 18px"
valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height:
18px" valign="top">
</td>
<td align="left" valign="top" style="height: 18px">
</td>
<td style="width: 100px; height: 18px">
</td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
</td>
<td align="left" style="height: 18px" valign="top">
</td>
<td align="left" style="height: 18px" valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap"
style="height: 18px"
valign="top"> </td>
<td align="center" class="nbdcontent" style="width: 13px; height:
18px" valign="top">
</td>
<td align="left" valign="top" style="height: 18px">
</td>
<td style="width: 100px; height: 18px">
</td>
</tr>
<tr style="color: #7f6a63">
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
9px; height: 18px"
valign="top"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
</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"> </td>
<td align="left" class="nbdcontent" nowrap="nowrap" style="width:
141px; height: 18px"
valign="top">
</td>
<td align="center" class="nbdcontent" style="height: 18px"
valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table></pre>
|
|
|
|
|
Wrong forum - this belongs in the ASP.net one please.
Also please format your code when you do post there (highlight it and click "code" just above the message text area. The other thing you could do is to just include the relevant markup please. It is unlikely that people are going to spend time reading a large-ish lump of code even to find the relevant bits. If you do both these things, you are much more likely to get help.
Alberto Brandolini: The amount of energy necessary to refute bullshit is an order of magnitude bigger than to produce it.
|
|
|
|
|
Dumping code, asking people to fix it
Download a working example and look for differences with your code.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|