954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Simple Date in Formview not posting.

:eek: Newbie here using VS2005 learning to program in VB.Net. I've got a simple Formview and in the Insert Template, I have s simple Textbox. The txtbox is databound and I have a code that auto put today's date in the txtbox. This post fine as long as I want to use today's date, but when I try to change the date to something else like 12/15/1945, it will post with today's date. No matter what I put in there, it will only post today's date. I have this code in the PageLoad event. Is this the right Event to use or should I use something esle?

'-----This puts in the current date
            Dim dtmToday As String
            dtmToday = Now.Date.ToString("MM/d/yyy")
                
            Dim LastMtgLabel As TextBox
            LastMtgLabel = FormView1.FindControl("DateTextBox")
            LastMtgLabel.Text = dtmToday



Thanks and this is my first post on this board.

pvong
Newbie Poster
1 post since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You