救命啊!被一个简单的问题困住了.
我用记事本写了一个测试的小程序,但是出错了,提示为:不能加载DataGrip类型
各位大哥帮忙看看.下面是我的程序:
<% @page language= "c# " %>
<% @Import Namespace= "System.Data " %>
<% @Import Namespace= "System.Data.SqlClient " %>
<form runat= "server ">
<asp:DataGrip id= "datagrip1 "
allowpaging= "true "
pagesize= "3 "
pagerstyle-horizontanAlign= "right "
pagerstyle-nextpagetext= "后页 "
pagerstyle-prevpagetext= "前页 "
OnPageIndexChanged= "ChangePage "
Headerstyle-BackColor= "#AAADDD "
AlternatingItemStyle-backcolor= "#FFFFCD "
bordercolor= "black "
cellspacing= "0 "
cellpadding= "2 "
runat= "server "> </asp:DataGrip>
</form>
<script language= "c# " runat= "server ">
void Bindgrip()
{
SqlConnection Conn=new SqlConnection(server=localhost;database=hua;uid=sa;pwd= ' ');
SqlDataAdapter dr=new SqlDataAdapter( "select * from grade ",Conn);
DataSet ds=new DataSet();
dr.fill(ds, "grade ");
datagtip.DataSource=ds.Tables[ "grade "].DefaultView;
datagrip.DataBind();
}
private Page_Load(object sender,EventArgs e)
{
if(!=IsPageBack)
{
Bindgrip();
}
}
</script>
------解决方案--------------------DataGrid,不是DataGrip,楼主也太粗心了吧??
===========================================
http://www.dotneturls.com —.net开发资源精华收集,正在不断更新及完善中,欢迎推荐资源并提出意见和建议!