Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 2nd, 2008, 12:21 AM
Authorized User
 
Join Date: Nov 2006
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to akhilhp
Default Problem converting string to Date.

Hi,

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....
 
Old July 2nd, 2008, 02:09 AM
Authorized User
 
Join Date: Nov 2006
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to akhilhp
Default

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)
 
Old July 6th, 2008, 08:02 AM
Authorized User
 
Join Date: Apr 2008
Posts: 54
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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
http://www.vbknowledgebase.com





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.