473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Client-Side Validation?

I want to perform client side validation on click of a ASP.NET web Server
Button Control. How shall i call my javascript function to do that ?

Also i want that the data shall be posted to the server only after
validation is performed. If the validation fails i don't want the page to be
posted back to the server.

Pls help?
--
Thank You.

Saket Mundra
Nov 19 '05 #1
2 823
hi,
if there is a textbox and u want to validate by server button here is the code
write a javascript
<script language ='Javascript'>
function ValTxt()
{
if(txt.value=="")
{
alert('value cannot be null');
return false;
}
else
return true;

}
</script>

on the page load of aspx page]

applybtn.Attributes.Add("OnClick","return ValTxt();");
jeebu

"Saket Mundra" <Sa*********@discussions.microsoft.com> wrote in message news:33**********************************@microsof t.com...
I want to perform client side validation on click of a ASP.NET web Server
Button Control. How shall i call my javascript function to do that ?

Also i want that the data shall be posted to the server only after
validation is performed. If the validation fails i don't want the page to be
posted back to the server.

Pls help?
--
Thank You.

Saket Mundra

Nov 19 '05 #2
Thanx for the help.

"Jeebu" wrote:
hi,
if there is a textbox and u want to validate by server button here is the code
write a javascript
<script language ='Javascript'>
function ValTxt()
{
if(txt.value=="")
{
alert('value cannot be null');
return false;
}
else
return true;

}
</script>

on the page load of aspx page]

applybtn.Attributes.Add("OnClick","return ValTxt();");
jeebu

"Saket Mundra" <Sa*********@discussions.microsoft.com> wrote in message news:33**********************************@microsof t.com...
I want to perform client side validation on click of a ASP.NET web Server
Button Control. How shall i call my javascript function to do that ?

Also i want that the data shall be posted to the server only after
validation is performed. If the validation fails i don't want the page to be
posted back to the server.

Pls help?
--
Thank You.

Saket Mundra

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Michael Rybak | last post by:
hi, everyone. I'm writing a 2-players game that should support network mode. I'm now testing it on 1 PC since I don't have 2. I directly use sockets, and both client and server do...
2
by: Raquel | last post by:
How do I know whether the 'runtime client' and the 'application development client' are installed on my machine? When I issue the command "db2licm -l", it gives the following output: Product...
2
by: Rhino | last post by:
I am trying to verify that I correctly understand something I saw in the DB2 Information Center. I am running DB2 Personal Edition V8.2.1 on Windows. I came across the following in the Info...
0
by: Harley | last post by:
Hello, I am just learning the tcp/ip functions etc under vb.net so please look over me if this is obviouse. I have been all over looking into any functions that I didn't totaly understand and...
8
by: Ankit Aneja | last post by:
i am doing here some some socket-client work in C# windows service it is working fine for multiple clients now i want to limit these multiple clients to 25 for example i want that when service...
2
by: Delmar | last post by:
I need to build Web Application that will generate a client to execute some operations. Each client has running silent application. Maybe somebody can advice me what can I do ? Thank you.
2
by: J Huntley Palmer | last post by:
I am having a horrific time integrating uw-imap's c-client for imap support in php. The problem is a whole bunch of "Text relocation remains referenced against symbol" errors during linking....
0
by: khu84 | last post by:
Here is client server very simple code, seems to work with telnet but with with web client code gives blank output. Following is the server code:- <?php function...
2
by: nsaffary | last post by:
hi I hava a client/server program that run correctly when i run it in one computer(local) but when I run client on a one computer and run server run on another, connection does not stablish.(I set...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.