Diffrent behaviour

  • Thread starter Thread starter M. Noroozi Eghbali
  • Start date Start date
M

M. Noroozi Eghbali

Hi all,

I put 3 validators in my page and set the "ClientScript" to true. All of
them works fine when I run the .NET application on my computer. But when I
publish the page on the internet, the validators cause postback events
instead.

this is the code:
----------------------------------------------------
<p><ASP:RequiredFieldValidator id="requiredFieldValidator1" runat="server"
errormessage="Enter your fullname." controltovalidate="fullname"
display="Dynamic" font-names="Verdana"
font-size="10pt"></ASP:RequiredFieldValidator>
</p><p><ASP:RequiredFieldValidator id="requiredFieldValidator2"
runat="server" font-names="Verdana" font-size="10pt"
errormessage="RequiredFieldValidator" display="Dynamic"
controltovalidate="email">Enter your email
address.</ASP:RequiredFieldValidator>
</p><p><ASP:RegularExpressionValidator id="regularExpressionValidator1"
runat="server" font-names="Verdana" font-size="10pt"
errormessage="RegularExpressionValidator"
validationexpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
display="Dynamic" controltovalidate="email">Please correct your email
address.</ASP:RegularExpressionValidator>
</p>
----------------------------------------------------

Any idea?

Thank you,
Mehrdad
 
Hi,

Well, that code was pretty much unreadable :)

IIRC this is cause you are missing the /aspnet_client dir there is where
the file for the client validators is
 
Thank you very much. it was the exact point.

Mehrdad


Ignacio Machin ( .NET/ C# MVP ) said:
Hi,

Well, that code was pretty much unreadable :)

IIRC this is cause you are missing the /aspnet_client dir there is where
the file for the client validators is


--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


M. Noroozi Eghbali said:
Hi all,

I put 3 validators in my page and set the "ClientScript" to true. All of
them works fine when I run the .NET application on my computer. But when
I publish the page on the internet, the validators cause postback events
instead.

this is the code:
----------------------------------------------------
<p><ASP:RequiredFieldValidator id="requiredFieldValidator1"
runat="server" errormessage="Enter your fullname."
controltovalidate="fullname" display="Dynamic" font-names="Verdana"
font-size="10pt"></ASP:RequiredFieldValidator>
</p><p><ASP:RequiredFieldValidator id="requiredFieldValidator2"
runat="server" font-names="Verdana" font-size="10pt"
errormessage="RequiredFieldValidator" display="Dynamic"
controltovalidate="email">Enter your email
address.</ASP:RequiredFieldValidator>
</p><p><ASP:RegularExpressionValidator id="regularExpressionValidator1"
runat="server" font-names="Verdana" font-size="10pt"
errormessage="RegularExpressionValidator"
validationexpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
display="Dynamic" controltovalidate="email">Please correct your email
address.</ASP:RegularExpressionValidator>
</p>
----------------------------------------------------

Any idea?

Thank you,
Mehrdad
 
Back
Top