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

📄 objectlist.aspx

📁 asp.net技术内幕的书配源码
💻 ASPX
字号:
<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="C#" %>
<html>
<head>
<title>Object List</title>
</head>
<body>

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

void Page_Load( object s,  System.EventArgs e)
 {
 if (!IsPostBack)
 {
  ArrayList colArrayList = new ArrayList();
  colArrayList.Add("Star Wars");
  colArrayList.Add("Gone with the Wind");
  colArrayList.Add("Citizen Kane");
  lstMovies.DataSource = colArrayList;
  lstMovies.DataBind();
}
}

void ObjectList_ItemCommand( object s, ObjectListCommandEventArgs e ) {
  if ( e.CommandName == "Buy" )
  {
    ActiveForm = frmBuyTicket;
  } 
  else
  {
    ActiveForm = frmShowDesc;
  }
}
  
</Script>

<Mobile:Form id="displayMovies" runat="Server">

<Mobile:ObjectList
  ID="lstMovies" 
  OnItemCommand="ObjectList_ItemCommand"
  Runat="Server">
<Command Name="Buy" Text="Buy" />
<Command Name="Desc" Text="Desc" />
</Mobile:ObjectList>

</Mobile:Form>

<Mobile:Form id="frmShowDesc" runat="Server">
  <b>Great Movie!</b>
</Mobile:Form>

<Mobile:Form id="frmBuyTicket" runat="Server">
  <b>Buy Ticket!</b>
</Mobile:Form>

</body>
</html>

⌨️ 快捷键说明

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