源代码如下:
    IEMR emrInfo= DBMng.DALFactory.EMR.Create();
    IList EmrBySex = new ArrayList();    protected void Page_Load(object sender, EventArgs e)
    {
        EmrBySex = emrInfo.GetEMRBySex("2");
        this.GD.DataSource = EmrBySex;
    }问题在哪?是什么原因?在WINFORM里面很正常

解决方案 »

  1.   

    <%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">  protected void Page_Load( object sender, EventArgs e )
      {
        ArrayList a = new ArrayList();
        a.Add("aa");
        a.Add("aa");
        GridView1.DataSource = a;
        GridView1.DataBind();
      }
    </script><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>BB</title>
    </head>
    <body>
        <form id="form1" runat="server">
      
          <asp:GridView ID="GridView1" runat="server">
          </asp:GridView>    </form>
    </body>
    </html>