KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have an asp.net page with a an html5 TextBox control set as the "date" type. The control on my page looks like this: <asp:TextBox ID="TextBoxMyDate" runat="server" type="date"/> It works great in the page and I can click on it and set the date. I can also read the date through TextBoxMyDate.Text. However, I cannot figure out how to programaticaly set the date. I have tried various formats of: TextBoxMyDate.Text = DateTime.UtcNow.ToString("MM/dd/yyyy") TextBoxMyDate.Text = DateTime.UtcNow.ToString("MM/dd/yyyy") My guess is that its much more complicated than simply setting the text value but I don't know where to go from here. Any suggestions?
Tags (comma-separated)
Save Edits
Cancel