编译出错:“GridView1_RowEditing”不是“ASP.default_aspx”的成员
初学者,请指点,谢谢!
问题1:
<asp:GridView ID= "GridView1 " OnRowEditing= "GridView1_RowEditing " runat= "server " CellPadding= "4 " BackColor= "White " BorderColor= "#336666 " BorderStyle= "Double " BorderWidth= "3px " Height= "1px " AllowSorting= "True ">
编译说GridView1_RowEditing 不是ASP的成员,是否是没有声明?该如何声明呢?
问题2:如下useing 语句是Jscript语句吗?与 <script language= "Vbscript " type= "text/javascript "> 设置是否有冲突?如果没有冲突,该放在什么地方(是否是在 <script> </script> 之间)?
using System;
using System.Data;
using System.Configuration;
using System.Web;
问题来源论坛资料http://blog.csdn.net/hanghwp/archive/2007/04/30/1593430.aspx
急需对GridView的编辑和更新功能,
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
已经学会加分,请详细指点,谢谢!
[解决办法]
OnRowEditing= "GridView1_RowEditing "
可能丢事件了。添加上试试。或者删掉试试。
[解决办法]
<%@ Page language= "c# " Codebehind= "WebForm1.aspx.cs " AutoEventWireup= "false " Inherits= "WebApp.WebForm1 " %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN " >
<HTML>
<HEAD>
<title> WebForm1 </title>
<meta name= "GENERATOR " Content= "Microsoft Visual Studio .NET 7.1 ">
<meta name= "CODE_LANGUAGE " Content= "C# ">
<meta name= "vs_defaultClientScript " content= "JavaScript ">
<meta name= "vs_targetSchema " content= "http://schemas.microsoft.com/intellisense/ie5 ">
</HEAD>
<body>
</body>
</HTML>
[解决办法]
vs2005是这个样子地
Default.aspx
Default.aspx.vb