回 帖 发 新 帖 刷新版面

主题:新手求教:帮我看一下哪里有问题.

private void Page_Load(Object sender,System.EventArgs e)
    {
      String str="server=tianyu; uid=sa; pwd=sa; Database=北风贸易;"
      SqlConnection objConnection=new SqlConnection(str);
      String strSQL="SELECT 身份证号码,姓名,家庭住址,自转 FROM 飞狐工作室";
      SqlCommand objCommand=new SqlCommand(strSQL,objConnection);
      objConnection.Open();
      SqlDataReader dr=objCommand.ExecuteReader();
      bool Firstrow=true;
      while(dr.read())
      {
       uidlist.Items.Add(new ListItem(dr[0].ToString()));
       if(Firstrow)
       {
        txtname.Text=dr[1].ToString();
        txtadress.Text=dr[2].ToString();
        txtContent.Text=dr[3].ToString();
        Firstrow=flase;
        }
        }
        dr.Close();
        objConnection.Close();
        }
        }

显示错误:
     Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1518: Expected class, delegate, enum, interface, or struct

Source Error:



Line 110:        #line hidden
Line 111:        
Line 112:        public chaxun_aspx() {
Line 113:            System.Collections.ArrayList dependencies;
Line 114:      

是不是不支持汉语??

回复列表 (共2个回复)

沙发

public chaxun_aspx() {
这句话有错误吧~~~
是不是public class chaxun_aspx()
或者是public void chaxun_aspx()?

板凳

但是,原码并没有那一行啊

我来回复

您尚未登录,请登录后再回复。点此登录或注册