Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 2nd, 2008, 12:21 AM
Authorized User
Join Date: Nov 2006
Location: Mandi, Himachal Pradesh, India.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to akhilhp
Default Problem converting string to Date.


I have developed a web project in asp.net 2.0, (VB). The project when run through VS 2005 was working very fine. But when I actually deployed the project (on the same machine where I developed it) it is giving problems. The problem is:

I am using Textbox to accept date. The date is being entered in dd/MM/yyyy format. I also use compare validator to compare the date to some other dates or the system date (whereever whichever required). Now while every thing was working fine before deployment, it is not giving desired results after deployment. After exmining it I have found out that while comparing it is converting date in (MM/dd/yyyy) format. My system's regional settings have date in dd/MM/yyyy format. Even when I use Cdate() function, it works fine through VS 2005 i.e. accets strings in dd/MM/yyyy format and converts them to dd/MM/yyyy format dates but after deployment it does not accept strings with dd/MM/yyyy format (e.g. when I enter date 13/07/2008 it gives error). Whereas I have learned that cdate accpts the local settings which is dd/MM/yyyy. Kindly somebody help me out. My project has been accepted and after successfull demo I am stuck after deployment....
Reply With Quote
  #2 (permalink)  
Old July 2nd, 2008, 02:09 AM
Authorized User
Join Date: Nov 2006
Location: Mandi, Himachal Pradesh, India.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to akhilhp

I was using Session.LCID = 2057 in Sub Session_Start in Global.asax and it was not working. Now I have Used session.LCID = 2057 on evry page in my project. It is working now. But can anybody suggest some better method (rather than using on every page)
Reply With Quote
  #3 (permalink)  
Old July 6th, 2008, 08:02 AM
Authorized User
Points: 198, Level: 3
Points: 198, Level: 3 Points: 198, Level: 3 Points: 198, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Apr 2008
Location: singapore, singapore, Singapore.
Posts: 54
Thanks: 0
Thanked 4 Times in 4 Posts

you may inherit all the pages from your custom class which inherits from system.web.ui.page. then you can do what ever you wish to do you can do it in this custom page. that will reflect in all pages

Pon Saravanan
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting node to string mister_mister XSLT 2 January 24th, 2008 12:23 PM
Problem converting from string to decimal georgetjojo Classic ASP Basics 1 November 29th, 2007 07:00 PM
Prevent converting empty textbox string to date. fizzerchris ASP.NET 2.0 Basics 2 May 18th, 2007 06:52 PM
Converting to character from date string denver Access VBA 7 June 9th, 2006 07:30 AM
converting date to julian date ramlaks SQL Server 2000 1 August 23rd, 2004 10:28 AM

All times are GMT -4. The time now is 08:10 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.