Example 1
案例1
The following example contains two forms in an .aspx file. The first form displays a calendar. When the user select a date from the calendar, the selected date is displayed in another form:
下面的案例包含了 .aspx 文件中的两张表单。第一张表单显示了一个日历。当用户从日历中选择一个日期时,被选的日期将在另外一张表单中显示:
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage"%> <%@ Register TagPrefix="Mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<script runat="server"> Sub CalChanged(sender as Object,e as EventArgs) lbl1.Text="You selected " & c1.SelectedDate ActiveForm=f2 End Sub </script>
<Mobile:Form id="f1" runat="server">
<Mobile:Calendar id="c1" OnSelectionChanged="CalChanged" runat="server" /> </Mobile:Form>
<Mobile:Form id="f2" runat="server">
<Mobile:Label id="lbl1" runat="server" /> </Mobile:Form>
|