gridview在后台无法显示
我是新手,正在学vs2005, 我再用gridview时发现我页面声明的gridview1在该页面的cs中找不到,就无法调用gridview1的功能我是不是少引用了什么还是哪出错了,希望帮我解决一下,谢谢
aspx:
<asp:GridView ID= "GridView1 " runat= "server " AllowPaging= "True " AllowSorting= "True " AutoGenerateDeleteButton= "True " AutoGenerateEditButton= "True ">
<Columns>
<asp:BoundField DataField= "ST_Student_id " HeaderText= "学号 " ReadOnly= "True " />
<asp:BoundField DataField= "ST_Student_name " HeaderText= "姓名 " />
<asp:BoundField DataField= "ST_Student_sex " HeaderText= "性别 " />
<asp:BoundField DataField= "ST_Student_nation " HeaderText= "民族 " />
<asp:BoundField DataField= "ST_Student_birthday " HeaderText= "出生日期 " />
<asp:BoundField DataField= "ST_Student_time " HeaderText= "入学时间 " />
<asp:BoundField DataField= "ST_Student_classid " HeaderText= "班级 " />
<asp:BoundField DataField= "ST_Student_home " HeaderText= "生源 " />
<asp:BoundField DataField= "ST_Student_else " HeaderText= "备注 " />
</Columns>
</asp:GridView>
cs的引用
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
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.Configuration;
------解决方案--------------------不是引用的问题,要注意大小写
------解决方案--------------------和2003不一样,是看不见自动生成的控件的声明语句的
注意是GridView1
如果出不来,看 this.GridView1能不能出来