In this article I will explain with an example, how to implement jQuery TimePicker plugin in ASP.Net using C# and VB.Net.
 
 
Download jQuery TimePicker Plugin
You will need to download the plugin files from the following location.
The complete documentation is available in the following link.
 
 
HTML Markup
The following HTML Markup consists:
TextBox – For displaying TimePicker.
Button – For submit the form and displaying selected Time in JavaScript Alert Message Box.
<asp:TextBox runat="server" ID="txtTime"></asp:TextBox>
<asp:Button runat="server" ID="btnSubmit" Text="Submit" OnClick="OnSubmit" />
 
 
jQuery TimePicker Plugin implementation
Inside the HTML Markup, first the following CSS file is inherited.
1. jquery.timepicker.min.css
 
And then, the following JS scripts are inherited.
1. jquery.min.js
2. jquery.timepicker.min.js
Inside the jQuery document ready event handler, the ASP.Net TextBox has been applied with the jQuery TimePicker plugin.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("[id*=txtTime]").timepicker();
    });
</script>
 
 
Fetching the value of selected Time on Server Side
When the Submit Button is clicked, the value of the selected Time is fetched from the Request.Form collection and is converted into DateTime object.
Finally, the selected Time is displayed using JavaScript Alert Message Box using the RegisterClientScriptBlock function.
C#
protected void OnSubmit(object sender, EventArgs e)
{
    DateTime dt = Convert.ToDateTime(Request.Form[txtTime.UniqueID]);
    ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", "alert('Selected Time : " + dt.ToShortTimeString() + "')", true);
}
 
VB.Net
Protected Sub OnSubmit(ByVal sender As Object, ByVal e As EventArgs)
    Dim dt As DateTime = Convert.ToDateTime(Request.Form(txtTime.UniqueID))
    ClientScript.RegisterClientScriptBlock(Me.GetType(), "alert", "alert('Selected Time : " & dt.ToShortTimeString() & "')", True)
End Sub
 
 
Screenshot
Implement jQuery TimePicker Plugin in ASP.Net
 
 
Demo
 
 
Downloads