Click here to Skip to main content
15,890,932 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionschedule task by the interval of day,month,year Pin
mbbisht31-Jul-06 17:53
mbbisht31-Jul-06 17:53 
AnswerRe: schedule task by the interval of day,month,year Pin
mnaveed1-Aug-06 0:45
mnaveed1-Aug-06 0:45 
Questioncheckbox in Infragistic webgrid Pin
walsudani31-Jul-06 16:13
walsudani31-Jul-06 16:13 
Questionextracting url in asp.net Pin
porsche996turbo31-Jul-06 16:10
porsche996turbo31-Jul-06 16:10 
AnswerRe: extracting url in asp.net Pin
mbbisht31-Jul-06 18:13
mbbisht31-Jul-06 18:13 
AnswerRe: extracting url in asp.net Pin
Khawar Abbas131-Jul-06 20:48
Khawar Abbas131-Jul-06 20:48 
QuestionDynamic custom validator at server? Pin
Member 9631-Jul-06 16:07
Member 9631-Jul-06 16:07 
AnswerRe: Dynamic custom validator at server? Pin
Tim Kohler31-Jul-06 19:08
Tim Kohler31-Jul-06 19:08 
I usually handle validation in 2 ways in asp.net...

1. I always check for basic field format (i.e. is it a phone number, zip code, email, etc) using the asp.net validator controls (i tend to use the customvalidator one almost all the time as I have a validation javascript that I include). I usually put a validation summary at the top of my forms to display all these field format errors. These are just sanity checks.

2. For business logic validation that happens on the server, I include an asp.net label where I output the business logic error/s. So my form postsback and I run bl checks. If they fail, I set the label to visible and set it's text to the error and stop the processing (i.e. I don't call save for instance). The only tricky thing with the label is to make sure you set it to not visible if your bl passes, especially if you don't redirect after your save.


Usually I create an 'error' class in a stylesheet and set my label and validators to use it. Or skin the validators if you're in asp.net 2.


I also tend to use a home grown custom server control, my 'errorcontrol' that includes this label and the validation summary. And usually has a 'seterrortext' method on it. I use this to simplify some of it.


You could play with the 'server validate' part of the validator controls but they are typically (I believe) tied to a specific control and not well suited for overall (across controls) form validation.



GeneralRe: Dynamic custom validator at server? Pin
Member 961-Aug-06 6:50
Member 961-Aug-06 6:50 
QuestionHow to insert data into database Pin
ypsyong31-Jul-06 15:32
ypsyong31-Jul-06 15:32 
AnswerRe: How to insert data into database Pin
Vipin Venugopal31-Jul-06 19:07
Vipin Venugopal31-Jul-06 19:07 
AnswerRe: How to insert data into database [modified] Pin
JustForLive1-Aug-06 0:04
JustForLive1-Aug-06 0:04 
QuestionTreeView Pin
smarttom9931-Jul-06 14:23
smarttom9931-Jul-06 14:23 
AnswerRe: TreeView Pin
minhpc_bk31-Jul-06 15:17
minhpc_bk31-Jul-06 15:17 
AnswerRe: TreeView Pin
Khawar Abbas131-Jul-06 18:28
Khawar Abbas131-Jul-06 18:28 
QuestionControl.Render in .NET 2.0 Pin
Ahmed Galal31-Jul-06 13:42
Ahmed Galal31-Jul-06 13:42 
AnswerRe: Control.Render in .NET 2.0 Pin
minhpc_bk31-Jul-06 15:19
minhpc_bk31-Jul-06 15:19 
GeneralRe: Control.Render in .NET 2.0 Pin
Ahmed Galal31-Jul-06 21:18
Ahmed Galal31-Jul-06 21:18 
QuestionServer Side [modified] Pin
ADY00731-Jul-06 12:47
ADY00731-Jul-06 12:47 
AnswerRe: Server Side Pin
Guffa31-Jul-06 13:28
Guffa31-Jul-06 13:28 
QuestionServer Running Out of Memory Pin
ikorenbl31-Jul-06 11:08
ikorenbl31-Jul-06 11:08 
AnswerRe: Server Running Out of Memory Pin
minhpc_bk31-Jul-06 15:23
minhpc_bk31-Jul-06 15:23 
QuestionMasked TextBox in VS.NET 2005 Pin
User 289802231-Jul-06 11:02
User 289802231-Jul-06 11:02 
AnswerRe: Masked TextBox in VS.NET 2005 Pin
Christian Graus31-Jul-06 11:22
protectorChristian Graus31-Jul-06 11:22 
AnswerRe: Masked TextBox in VS.NET 2005 Pin
minhpc_bk31-Jul-06 15:26
minhpc_bk31-Jul-06 15:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.