菜单切换
FACESOHO知行者
心灵
记录
远方
源代码:
保存
点击运行
<script runat="server"> Sub Page_Load if Not Page.IsPostBack then lbl1.Text="The date and time is " & now() end if End Sub Sub submit(s As Object, e As EventArgs) lbl2.Text="Hello World!" End Sub </script>
<!DOCTYPE html> <html> <body> <form runat="server"> <h3><asp:label id="lbl1" runat="server" /></h3> <h3><asp:label id="lbl2" runat="server" /></h3> <asp:button text="Submit" onclick="submit" runat="server" /> </form> </body> </html>
运行结果
The date and time is 9/21/2013 5:31:55 AM