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

Validation Controls Postback

I have a little problem while working with Validation Controls in extensive
forms... When the user reaches the end, and something is wrong, it just
highlights the messages (a client-side script)... But, if the field is on
the top of the form, and the user doesn't search, and keep clicking on the
button, he will think that there's a problem on the form...
I would like to know how could I implement a way that the click button does
a postback, and then, if the IsValid variable is wrong, the correct messages
are show....
Thanks,
Rafa
Nov 17 '05 #1
2 4397
Turn off the client side validation for each control and check IsValid() in
your CodeBehind. You can use a ValidationSummary control to get all of the
problems and pass it back to the client as a list of problems.

NOTE: .NET always does a server side check, even if you never use it, with
every validation. As clever hackers get around client side validation, it is
always a good thing to check IsValid() every time, even if you have client
side validation turned on.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge

************************************************** **************************
****
Think Outside the Box!
************************************************** **************************
****
"Rafael Veronezi" <ra****@dmweb.com.br> wrote in message
news:u6**************@TK2MSFTNGP10.phx.gbl...
I have a little problem while working with Validation Controls in extensive forms... When the user reaches the end, and something is wrong, it just
highlights the messages (a client-side script)... But, if the field is on
the top of the form, and the user doesn't search, and keep clicking on the
button, he will think that there's a problem on the form...
I would like to know how could I implement a way that the click button does a postback, and then, if the IsValid variable is wrong, the correct messages are show....
Thanks,
Rafa

Nov 17 '05 #2
Maybe you can do a Focus to a validation sumery??
"Rafael Veronezi" <ra****@dmweb.com.br> wrote in message
news:u6**************@TK2MSFTNGP10.phx.gbl...
I have a little problem while working with Validation Controls in extensive forms... When the user reaches the end, and something is wrong, it just
highlights the messages (a client-side script)... But, if the field is on
the top of the form, and the user doesn't search, and keep clicking on the
button, he will think that there's a problem on the form...
I would like to know how could I implement a way that the click button does a postback, and then, if the IsValid variable is wrong, the correct messages are show....
Thanks,
Rafa

Nov 17 '05 #3

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

Similar topics

4
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. ...
7
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How...
4
by: AIM48 | last post by:
Hi. We have a framework that we work with for our project. So far we have had very good success – basically the frame work wraps many day to day tasks so that they are all included in the...
3
by: Jonas | last post by:
Hi! I have aspx-page where I use multiple panels to make room for more controls than would otherwise fit onto one page. On submit, the controls on all panels, visible or not, should be validated...
4
by: Alan Silver | last post by:
Hello, I have been playing with some of the code in ASP.NET Unleashed, to try and understand what's going on. I am getting on pretty well, but have struck a problem. I was looking at samples for...
2
by: Roh | last post by:
Hi, Can we use Javascript and .Net Validation controls on the same page. If yes how? Please provide some examples which will help me a lot....thanks.
1
by: NancyASAP | last post by:
Thought I'd share this since it took me a long time to get it working. Thanks to a bunch of contributers in Google Groups who shared javascript, etc. The question was: How can I put a reset...
1
by: Frankie | last post by:
Sanity Check Requested! I've been writing code way too long for the past several days and just came across this bit of logic I wrote several weeks ago. Suddenly something seems wrong with it and...
0
by: dhurwitz | last post by:
Hi, In my ASP.NET 2.0 web app, I have a user control, ucBinEdges, with several text boxes. The user control has several validation controls validating the Text of these text boxes -...
2
by: william.oram | last post by:
I have a few controls on a basic form I'm working on that make use of postback: for example, click a checkbox to make Panel1 and its subcontrols visible. I've since added clientside and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.