473,395 Members | 1,504 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,395 software developers and data experts.

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 1601
<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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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...

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.