Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / April 2008



Tip: Looking for answers? Try searching our database.

Validation of fields in FormView C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
c# junkie - 15 Apr 2008 18:23 GMT
Title says it  ... my C# web application uses a number of FormViews that are
inserted/updated/deleted via stored procedures.

Is there a way thru C# coding (example?) to validate a date field as valid
input before inserting/updating?  Test the length of a varchar/char field?  
Validate an int field as valid numeric input (no alpha) ... and so on?

I would like to do this validation before the stored procedures fire
(perhaps stopping), of course so the user does not see the cryptic messages
that come back by default.

It would be nice to see some C# examples or the specifics on another
workarounds.  Thanks to all you pros for reading.
Bob Barrows [MVP] - 15 Apr 2008 18:36 GMT
> Title says it  ... my C# web application uses a number of FormViews

There was no way for you to know it (except maybe by browsing through
some of the previous questions before posting yours - always a
recommended practice),  but this is a classic asp newsgroup. ASP.Net is
a different technology from classic ASP. While you may be lucky enough
to find a dotnet-savvy person  here who can answer your question, you
can eliminate the luck factor by posting your question to a newsgroup
where the dotnet-savvy people hang out.  I suggest
microsoft.public.dotnet.framework.aspnet.
There are also forums at www.asp.net where you can find a lot of people
to help you.

> that are inserted/updated/deleted via stored procedures.
>
> Is there a way thru C# coding (example?) to validate a date field as
> valid input before inserting/updating?  Test the length of a
> varchar/char field? Validate an int field as valid numeric input (no
> alpha) ... and so on?

Do you mean like the intrinsic Validator controls?
.

Signature

Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.