复制代码
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="EmptyProjectNet45_FineUI.test" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title></title>
- </head>
- <body>
- <form id="form1" runat="server">
- <f:PageManager ID="PageManager1" AjaxLoadingType="Mask" runat="server"></f:PageManager>
- <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false">
- <Items>
- <f:DropDownList ID="ddlLB" runat="server" Label="列表" AutoPostBack="true" OnSelectedIndexChanged="ddlLB_SelectedIndexChanged" ></f:DropDownList>
- <f:Button ID="btnTest" runat="server" Text="测试"></f:Button>
- <f:Label ID="Label1" runat="server"></f:Label>
- </Items>
- </f:Panel>
- </form>
- </body>
- </html>
复制代码
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Data;
- using FineUI;
- namespace EmptyProjectNet45_FineUI
- {
- public partial class test : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- LoadLB();
- }
- }
- private void LoadLB()
- {
- for (int i = 1; i <= 37; i++)
- {
- this.ddlLB.Items.Add(new ListItem(i.ToString(), i.ToString()));
- }
- this.Label1.Text = "列表长度:" + ddlLB.Items.Count.ToString();
- }
- protected void ddlLB_SelectedIndexChanged(object sender, EventArgs e)
- {
- Alert.Show("触发了SelectedIndexChanged事件!");
- }
- protected void btnTest_Click(object sender, EventArgs e)
- {
- }
- }
- }
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/) | Powered by Discuz! X3.4 |