Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 6th, 2005, 03:07 AM
Authorized User
 
Join Date: May 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to saravananedu
Default client side validation without postback

Hi..all,

Im new to dotnet. I want to know how to do client script validation (say..javascript) without submitting the page. RequiredFieldValidator is useful when the user omits any entry.

But while clicking the submit button of the page, i want to do a validation in javascript as the text box entry should be a number and should not exceed the value 1000. since the button is a server control, after the javascript, control is not getting terminated. page continues to server side script and got submitted. how to overcome this without going to server side script?

Thanks in advance.

Best Regards,
Saravanan.
__________________
Best Regards,
Saran.
 
Old August 6th, 2005, 04:28 AM
Authorized User
 
Join Date: Dec 2004
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://msdn.microsoft.com/library/de...omfunction.asp

HTH

 
Old August 7th, 2005, 12:22 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

u can use validation using JavaScript (Client Side or Server Side)
create funtion for validation & put it in form tag like
Code:
<script language="JavaScript">
function valid_form()
{
 if ....  
 else .....
 return false/true
}
</script>
then put it in form tag like
Code:
<form name="yyy" method="post" action="xxx.aspx" language="javascript" onsubmit="if (!valid_form()()) return false;" id="iii">
HTH.

Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Is client-side validation in ASP.NET 2.0 possible? jacob ASP.NET 2.0 Basics 6 April 10th, 2007 05:07 AM
Client Side Validation anujrathi ASP.NET 1.0 and 1.1 Professional 1 June 17th, 2006 10:23 PM
checkbox validation on client side using Javascrip sansircar ASP.NET 1.0 and 1.1 Professional 0 October 17th, 2005 07:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.