zoukankan      html  css  js  c++  java
  • 后台数组传到前台

    cs
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page 
    {
    protected int[] la = new int[]{1,2,3,4,5}; protected void Page_Load(object sender, EventArgs e)
    { }
    }
    aspx
    
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <select>
    <% for (int i = 0; i < la.Length; i++)
    {%>
    <option value="<%=i %>"><%=i %></option>
    <%} %>
    </select>
    </div>
    </form>
    </body>
    </html>
    

      

    栋栋
  • 相关阅读:
    UVA 1001 Say Cheese
    UVa 821 Page Hopping
    UVA 1569 Multiple
    UVA 1395 Slim Span
    UVA 12219 Common Subexpression Elimination
    UVA 246 10-20-30
    Mysql基本操作
    浅析关键字static
    面试回答技巧
    五个程序员好习惯
  • 原文地址:https://www.cnblogs.com/zhangdongdong/p/3204434.html
Copyright © 2011-2022 走看看