473,473 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Required Filed Validator Small Question

I know RFV works(executes) on both Client side and server side.

But if I want to execute only on Client Side due to performance reason then
what I have to do?

Ex: I have a Text box which must be filled. when i Click the Submit button,
immediately Client Side Script shoulb be execute first with out going to
server first.

AM I CLEAR to YOU.....? Please Help Me
Nov 22 '05 #1
6 1602
<msdn>
Validation is performed on the server even if it was already performed on
the client. This allows you to check validation status in server code and
provides security against users bypassing validation.
</msdn>

If you have IE 4+, validations happen on the client-side without any
postback to the server.

Hope that helps.

"VIJAY KUMAR" <VI********@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...
I know RFV works(executes) on both Client side and server side.

But if I want to execute only on Client Side due to performance reason then
what I have to do?

Ex: I have a Text box which must be filled. when i Click the Submit button,
immediately Client Side Script shoulb be execute first with out going to
server first.

AM I CLEAR to YOU.....? Please Help Me
Nov 22 '05 #2
What you could do is to use good, old-fashioned client-side javascript -
say, adding something on the onClick handler. You have to add this
programmatically by adding it to the Controls, Attributes

--
Sriram Krishnan

http://www.dotnetjunkies.com/weblog/sriram
"Shiva" <sh******@online.excite.com> wrote in message
news:up**************@TK2MSFTNGP11.phx.gbl...
<msdn>
Validation is performed on the server even if it was already performed on
the client. This allows you to check validation status in server code and
provides security against users bypassing validation.
</msdn>

If you have IE 4+, validations happen on the client-side without any
postback to the server.

Hope that helps.

"VIJAY KUMAR" <VI********@discussions.microsoft.com> wrote in message
news:B8**********************************@microsof t.com...
I know RFV works(executes) on both Client side and server side.

But if I want to execute only on Client Side due to performance reason
then
what I have to do?

Ex: I have a Text box which must be filled. when i Click the Submit
button,
immediately Client Side Script shoulb be execute first with out going to
server first.

AM I CLEAR to YOU.....? Please Help Me

Nov 22 '05 #3

Suppose I want to confirm from user before Delete a Record. When the user
clicks on Delete button, it should raise Confirmation message box immediatly
without going to Server. How can we do that?
My Problem :

I used <asp:buton.....> control with Refquired field validator. When user
clicks on Delete button , he/she must fill 2 fileds before delete that
record. When it was filed then only the confirmation shold raise.

When i working Locally everthing wols fine. When i deploy it on server i
am facing the prbolem which is explained below
its checking the required fileds validation. When user enter those
required values then only the form is submitting(Deleting the Record from
datrabase). But its not raising any confirmation.
I want to know the reason?

I hope I am clear this time,

Thanks for you help

Nov 22 '05 #4
In the page load: Button.Attributes.Add ("onClick", "return
confirm('Delete?');");

"VIJAY KUMAR" <VI********@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...

Suppose I want to confirm from user before Delete a Record. When the user
clicks on Delete button, it should raise Confirmation message box immediatly
without going to Server. How can we do that?
My Problem :

I used <asp:buton.....> control with Refquired field validator. When user
clicks on Delete button , he/she must fill 2 fileds before delete that
record. When it was filed then only the confirmation shold raise.

When i working Locally everthing wols fine. When i deploy it on server i
am facing the prbolem which is explained below
its checking the required fileds validation. When user enter those
required values then only the form is submitting(Deleting the Record from
datrabase). But its not raising any confirmation.
I want to know the reason?

I hope I am clear this time,

Thanks for you help


Nov 22 '05 #5
btnDelete.Attributes("onclick")="return confirm(""Are you really really
sure?"");"

Or something alone these lines

--
Sriram Krishnan

http://www.dotnetjunkies.com/weblog/sriram
"VIJAY KUMAR" <VI********@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...

Suppose I want to confirm from user before Delete a Record. When the user
clicks on Delete button, it should raise Confirmation message box
immediatly
without going to Server. How can we do that?
My Problem :

I used <asp:buton.....> control with Refquired field validator. When user
clicks on Delete button , he/she must fill 2 fileds before delete that
record. When it was filed then only the confirmation shold raise.

When i working Locally everthing wols fine. When i deploy it on server i
am facing the prbolem which is explained below
its checking the required fileds validation. When user enter those
required values then only the form is submitting(Deleting the Record from
datrabase). But its not raising any confirmation.
I want to know the reason?

I hope I am clear this time,

Thanks for you help

Nov 22 '05 #6


"VIJAY KUMAR" wrote:
I know RFV works(executes) on both Client side and server side.

But if I want to execute only on Client Side due to performance reason then
what I have to do?

Ex: I have a Text box which must be filled. when i Click the Submit button,
immediately Client Side Script shoulb be execute first with out going to
server first.

AM I CLEAR to YOU.....? Please Help Me


I am not 100% sure but I think if you leave out the If page.isvalid Then
..... The server-side validation is not processed.....but I could be wrong :)
Nov 22 '05 #7

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

Similar topics

6
by: VIJAY KUMAR | last post by:
I know RFV works(executes) on both Client side and server side. But if I want to execute only on Client Side due to performance reason then what I have to do? Ex: I have a Text box which must...
7
by: Stephen | last post by:
I have some code which I call from a custom validator however I seem to have got the logic wrong and im having trouble figuring out how to write my code to get things to work the way I require....
2
by: Martin | last post by:
Dear Group It says in MSDN that a field can be associated with more than one validators but can one validator be associated with more than one field? Or do I need a validator for each field? How...
1
by: Simon Harvey | last post by:
Hi, With required validator controls, if the field is empty and you tab out, a message is displayed. Fairly standard behaviour. However, I would like to make a small change to the controls...
2
by: z. f. | last post by:
Hi, i have a field with required field validator. on the client side it's working. when i submit without the required field the page gets back because of not valid, but the message from the...
3
by: VB Programmer | last post by:
Can you make a required field validator optional? I know it sounds crazy, but.... Let's say I have a signup form. It consists of 2 sections. The top section is a "GOLD MEMBER" section. It...
2
by: pmud | last post by:
Hi, I have an ASP.Net web page . The page was working fine until I added a required field field validator. My page has a link button which takes the user to another page, a submit button which...
3
by: Skeptical | last post by:
Hello, I have a form and two buttons on it. Button1 submits the data to a database and RequiredFieldValidator is used to make sure all the required fields are filled up, the second button has a...
2
by: David Hearn | last post by:
I have some required field validators on a form and would like to know if there is a way to set focus back to the field that is required if the validator is triggered. The problem is that the...
40
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.