主题:小菜请求帮助:分析器错误
分析器错误
说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。
源错误:
行 1: <%@ Application Codebehind="Global.asax.cs" Inherits="cha1.Global" %
代码行:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
namespace cha1
{
/// <summary>
/// WebForm1 的摘要说明。
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DropDownList uidlist;
protected System.Web.UI.WebControls.TextBox txtname;
protected System.Web.UI.WebControls.TextBox txtadress;
protected System.Web.UI.WebControls.TextBox txtcontent;
private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
SqlConnection myConnection=new SqlConnection("server=TY;uid=sa;pwd=sa;database=北风贸易;");
SqlCommand myCommand = new SqlCommand("SELECT 身份证号码,姓名,家庭住址,自传 FROM 飞狐工作室", MyConnection);
myConnection.Open();
SqlDataReader dr=myCommand.ExecuteReader();
bool firstrow=true;
while(firstrow)
{
txtname.Text=dr[1].ToString();
txtadress.Text=dr[2].ToString();
txtcontent.Text=dr[3].ToString();
firstrow=false;
}
dr.Close();
myConnection.Close();
}
}
说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。
源错误:
行 1: <%@ Application Codebehind="Global.asax.cs" Inherits="cha1.Global" %
代码行:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
namespace cha1
{
/// <summary>
/// WebForm1 的摘要说明。
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DropDownList uidlist;
protected System.Web.UI.WebControls.TextBox txtname;
protected System.Web.UI.WebControls.TextBox txtadress;
protected System.Web.UI.WebControls.TextBox txtcontent;
private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
SqlConnection myConnection=new SqlConnection("server=TY;uid=sa;pwd=sa;database=北风贸易;");
SqlCommand myCommand = new SqlCommand("SELECT 身份证号码,姓名,家庭住址,自传 FROM 飞狐工作室", MyConnection);
myConnection.Open();
SqlDataReader dr=myCommand.ExecuteReader();
bool firstrow=true;
while(firstrow)
{
txtname.Text=dr[1].ToString();
txtadress.Text=dr[2].ToString();
txtcontent.Text=dr[3].ToString();
firstrow=false;
}
dr.Close();
myConnection.Close();
}
}