1 Replies - 647 Views - Last Post: 01 June 2011 - 11:53 AM Rate Topic: -----

#1 Erber  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 60
  • Joined: 08-September 10

Strange problem with getting text from a textbox

Posted 01 June 2011 - 11:36 AM

I'm writing an ASP.NET page, and in the code behind I'm getting information from a textbox. I have it getting the text using txtBoxName.Text but it seems to be truncating its content in a strange way. The textbox contains a date, and I have it set up so that if the number is a single digit, it will be preceded by a zero.(example: 2001/11/06) However, when I use the text in the code behind, it truncates the zeroes out. Zeroes in the year will remain, but a number that's preceded by zeroes will lose the zeroes. This is causing problems in my code behind, and I'm having trouble finding the problem in the text.

I'm using calendar exteneders to fill the text, witch are formatted to include the zeroes ( format="dd/MM/yyyy" )

One idea I have as the problem is something to do with the way using textBox.Text to pass the text, but I couldn't find any information on this on msdn.

*edit* Nevermind everything is fine!

If a mod could lock this that would be nice.

This post has been edited by Erber: 01 June 2011 - 11:54 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Strange problem with getting text from a textbox

#2 Nakor  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • Joined: 28-April 09

Re: Strange problem with getting text from a textbox

Posted 01 June 2011 - 11:53 AM

where's your code your using to get the values from the textbox?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1