Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Firing server object/web service from a client validation...

Reply
Thread Tools

Firing server object/web service from a client validation...

 
 
arc
Guest
Posts: n/a
 
      02-05-2004
I have a server object that performs zipcode validation based on zipcode
entered in the web form.
Ideally this should work as follows:
Once the zip code is entered in the edit box it should validate the
entry with this server object before moving to enter state in the next
dropdown field.

- What is the event by which we can do this for the edit box? (OnBlur doesnt
seem to capture the text though it fires up the server object)
- This works fine when the validation is performed at the server level but
user has to wait until the submit button is pressed, this is not feasible
here.

Thanks Much,
Arc


 
Reply With Quote
 
 
 
 
Chris Jackson
Guest
Posts: n/a
 
      02-06-2004
If you write client-side javascript, you can trap the OnChange event of the
<input type="text" /> that you want to validate, and then either do your own
custom validation, or else call the ASP.NET validation system. I have always
called the ASP.NET validators as a whole, and not individually, so you would
have to poke through the script to see if you can get at this individually
or if you need to call validation on everything (which may cause problems if
you have required field validators that you haven't get gotten to on the
page). What I typically do is client-side validation where I present all of
the problems at the end, and then present very descriptive error messages
that point them to the control that is incorrect, rather than checking as
they type. If you wanted to get super-fast responses, you could trap
onkeydown and check after every keystroke, but that seems like overkill to
me.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"arc" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a server object that performs zipcode validation based on zipcode
> entered in the web form.
> Ideally this should work as follows:
> Once the zip code is entered in the edit box it should validate the
> entry with this server object before moving to enter state in the next
> dropdown field.
>
> - What is the event by which we can do this for the edit box? (OnBlur
> doesnt
> seem to capture the text though it fires up the server object)
> - This works fine when the validation is performed at the server level but
> user has to wait until the submit button is pressed, this is not feasible
> here.
>
> Thanks Much,
> Arc
>
>



 
Reply With Quote
 
 
 
 
Steve Fulton
Guest
Posts: n/a
 
      02-06-2004
Peter Blum wrote:
> First, I notice that you cross posted. Please don't do that as we cannot
> follow all the responses elsewhere and may be wasting our time replying when
> you already have a satisfactory response from another newsgroup.


That is not a problem with cross-posting. Replies in any group will be
propagated to all groups. Multi-posting (identical, *separate* posts to
different newsgroups) suffers from this problem and is a strict no-no.
Cross-posting to an excessive number of unrelated groups is frowned upon.

--
Steve

Common sense is the collection of prejudices acquired by age eighteen.
-Albert Einstein


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Button disabled and re-enabled in client side not firing server-side click event. =?Utf-8?B?QmluIFNvbmcsIE1DUA==?= ASP .Net 2 05-27-2008 09:57 AM
LinkButton Client side code firing before server side code alexmac262@hotmail.com ASP .Net 1 03-22-2007 06:13 PM
Server to server = Server client to server? - Java 2 07-29-2005 10:46 PM
Firing server object/web service from a client validation... arc ASP .Net 3 02-06-2004 08:11 PM
client and server validators not firing in aspx 1.1 Bernard Borsu ASP .Net Web Controls 4 07-15-2003 09:14 AM



Advertisments