I read many topics about this but I'm having a problem with the Textmode = "Time" property on .NET 4.5, as well.
I have this on aspx side:
<asp:TextBox runat="server" ID="txtBoxStartTime" TextMode="Time"></asp:TextBox>
On vb.net side, when I try to get the Text value from this textbox, I have nothing but empty string ("").
CDate(txtBoxStartTime.Text)
On client-side, in webInspector I can easily take the value from the textbox, but I need it in server-side...
Even though I try with HTML5 tags with runat="server" I encounter the same problem.
I've noticed the problem is the same with all of the Textmode Property on Framework 4.5
Any suggestions/solutions on this? I truly appreciate your input!
Thanks!
Use this Attribute: "format"
<asp:TextBox ID="txtTime" runat="server" TextMode="Time" format="HH:mm" />
it will return the format of 24 for hours.
if your value is 10:00 PM then in server side the (txtTime.Text) value will be "22:00".
I Test it in Chrome and it's work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With