简体   繁体   中英

HTML5 type week in vb.net how can I get the value?

I have this type week control on my page, it fires an event on Page Load, but how can I get its value? txtSettimana.text is empty and there's no "value" property I can choose.

<asp:TextBox runat="server" ID="txtSettimana" Type="week" ToolTip="Data" required="required" AutoPostBack="true" autocomplete="off"></asp:TextBox>

txtSettimana.Text will be null string (empty as you said) in the Page Load event for the first time because no value is set to it yet.

Let's say, you also have a <asp:Button> in your page, then you select the week in your txtSettimana and click the button, then it will trigger the Button Click event.

In the Button Click event, you will get the value of txtSettimana.Text .

Clicking the button will also trigger the Page Load event as the second time. At this time you can also get the value of txtSettimana.Text .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM