hi every body
In Asp.Net, what control is more suitable for getting time (hh:mm) from user and pass it as a parameter to a query?
hi every body
In Asp.Net, what control is more suitable for getting time (hh:mm) from user and pass it as a parameter to a query?
I believe you have to choose between the following three:
TextBox
and do extensive input validation.TextBox
.DropDownList
controls - one for hours, one for minutes.Which one is better? I would say, that depends a lot on the expected users of your application. Anyone used to working with a keyboard is likely to prefer the TextBox
. Others might prefer the other options. For the broad masses, I would most likely go for solution #2, as it should suit both keyboard and mouse centric users.
If you choose to go with a third-party control, be wary that it might not degrade gracefully for users that do not accept Javascript. The control might just revert to a simple TextBox
, possibly without any validation logic.
If you don't mind using the ASP.NET Ajax Control Toolkit, you can use the MaskedEdit control. The second example shows you how to let users enter a time-value.