Validating date in textbox in asp net

Make sure the culture is set correctly in your web.config and set Culture Invariant Values to false.Set the Value To Compare server-side to the current date.

validating date in textbox in asp net-75

Validating date in textbox in asp net horror stories of online dating

NET validation controls perform validation automatically when the page is posted back to the server, after page initialization (that is, after view-state and postback data have been processed) and before your event-handling code is called.

The controls might also perform validation in the browser if the browser supports client script.

However, there are times when you might want to perform validation yourself programmatically.

You might validate programmatically under these circumstances: By default, the ASP.

I want date in a dd/mm/yyyy format with validation in Text Box . As I got date with dd/mm/yyyy but it will also accept 32/02/2005. Also when I compare two textbox it will not evalute properly. So I had used Compare Validator, & select type="date" but it will not evalute. Thanking You, One thing that must be kept in mind when using Asp.

Is Valid value that tells the page if validators returned true or false and then proceed further.

This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. I have to validate the date entered in textbox that it "should not be greater than or equal to current date". -- Abhishek You can use a compare validator, set the type to date.

In my application, i have a textbox namely textbox1.

Imar --------------------------------------- Imar Spaanjaars

To check is string a valid date you can use Compare Validator.

Joe (Microsoft MVP - XML)Hi Joe I dont want to do any server side validation, i want to handle client side only, thats why i have posted my issue in the javascript forum.

Tags: , ,