⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 temp.aspx

📁 asp入门到精通的源代码
💻 ASPX
字号:
<%@ Page Inherits="System.Mobile.UI.MobilePage" Language="C#" %>
<%@ Register TagPrefix="Mobile" Namespace="System.Mobile.UI" %>
<%@ Import Namespace="System.ComponentModel" %>
<%@ Import Namespace="System.Mobile" %>

<script runat="server" language="c#">

protected void Page_Load(Object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        // Add all property names found in the device capabilities class.

        MobileCapabilities properties = (MobileCapabilities)Request.Browser;

        //PropertyDescriptorCollection properties = TypeDescriptor.GetProperties (Request.Browser);
        if (properties != null)
        {
            // Bind directly to list, which can extract Name property from
            // each property.
            CapabilityList.DataSource = properties;
            CapabilityList.DataBind ();
        }
    }
}

protected void CapabilityList_OnClick(Object sender, ListCommandEventArgs e)
{
    String propertyName = e.ListItem.Text;
    CapabilityName.Text = propertyName;
    CapabilityValue.Text = DataBinder.Eval (Request.Browser, propertyName, "{0}");

    ActiveForm = SecondForm;
}

</script>

<Mobile:Form runat="server" Wrapping="NoWrap">
    <Mobile:Label runat="server" StyleReference="title" Text="Mobile Capabilities" />
    <Mobile:List runat="server" id="CapabilityList" DataTextField="Name" 
        OnItemCommand="CapabilityList_OnClick" AllowPaging="true" />
</Mobile:Form>

<Mobile:Form runat="server" id="SecondForm">
    <Mobile:Label runat="server" id="CapabilityName" StyleReference="title" />
    <Mobile:Label runat="server" id="CapabilityValue" />
</Mobile:Form>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -