plz hel me当前上下文中不存在名称“GridView1” [英] plz hel me The name 'GridView1' does not exist in the current context
问题描述
很长一段时间我都面临这个问题并一次又一次地重写代码 我应该怎么做........
a lot of time i am face this problem and rewrite code again and again what should i do........
<%@ Page Language
<%@ Page Language
=" C#" AutoEventWi
="C#" AutoEventWi
reup =" true" CodeB
reup="true" CodeB
ehind =" WebForm1.aspx.cs"继承= QUOT; WebApplication3.WebForm1" %>
此处代码为.aspx
ehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>
here code of .aspx
<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns =" http://www.w3.org / 1999 / xhtml">&
< head runat =" server">
< title>< / title>
< / head>
< body>
< form id =" form1" runat =" server">
< div>
&NBSP; &NBSP; < asp:Button ID =" Button1" RUNAT = QUOT;服务器"的onclick = QUOT;&的button1_Click QUOT; Text =" Button"
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP;宽度=" 87px" />
$
< asp:GridView ID =" GridView1" runat =" server">
< / asp:GridView>
& nbsp;& nbsp;& nbsp;
&NBSP; &NBSP; < br />
&NBSP; &NBSP; < br />
&NBSP; &NBSP; < br />
< / div>
< / form>
< / body>
< / html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button"
Width="87px" />
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
<br />
<br />
<br />
</div>
</form>
</body>
</html>
和.aspx.cs代码
and .aspx.cs code
推荐答案
hi vivek
hi vivek
这是图表控制论坛
请在ASP.NET论坛上发帖提问
please post a question on the ASP.NET Forum
谢谢
这篇关于plz hel me当前上下文中不存在名称“GridView1”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!