Solved

Data validation for detailsview control

Posted on 2006-11-02
3
465 Views
Last Modified: 2008-02-26
I am using a detailsview to insert/edit records and I need to validate
the data to be inserted before insertion. So if a user tries to enter monday 29th
into a date field I can catch it and return an error page detailing date format to be used.

using MS visual studio, asp.net 2
0
Comment
Question by:deNZity
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
craskin earned 500 total points
ID: 17861621
i think the boundfields in a detailsview have flags for regex validation built-in, but i'm not sure.
0
 

Author Comment

by:deNZity
ID: 17861911
Thanks for the reply but I think that applies only to textboxes and the like not data controls

<asp:RegularExpressionValidator id="regex"....
0
 

Author Comment

by:deNZity
ID: 17878570
Apologies you where partly correct, but for detailsview this has to be done from template.
great tutorial/s here.

http://www.asp.net/learn/dataaccess/tutorial19vb.aspx?tabid=63
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question