小编cia*_*182的帖子

名称"___"在当前上下文中不存在

我似乎在Visual Studio 2012中遇到了我的项目问题,我收到了21个错误,说当前上下文中不存在名称(ddlstud,hidId,txtName,txtCoverImage,txtReldate,gvVidGame).我将default.aspx文件设置为从default.aspx.cs文件中读取.

这是我的default.aspx文件

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="True" CodeBehind="Default.aspx.cs" Inherits="VideoGameWiki._Default" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">

</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <asp:GridView ID="gvVidGame" runat="server"></asp:GridView><br />
    <asp:Label ID="lblName" runat="server" Text="Name: "></asp:Label>
    <asp:TextBox ID="txtName" runat="server"></asp:TextBox><br />
    <asp:Label ID="lblStud" runat="server" Text="Studio: "></asp:Label>
    <asp:DropDownList ID="ddlStud" runat="server"></asp:DropDownList><br />
    <asp:Label ID="lblReldate" runat="server" Text="Release date: "></asp:Label>
    <asp:TextBox ID="txtReldate" runat="server"></asp:TextBox><br />
    <asp:Label ID="lblCoverImage" runat="server" Text="Cover Image: "></asp:Label>
    <asp:TextBox ID="txtCoverImage" runat="server"></asp:TextBox><br />
    <asp:Label ID="lblDescr" runat="server" Text="Description: "></asp:Label>
    <asp:TextBox ID="txtDescr" runat="server"></asp:TextBox>
    <br />
    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Add" …
Run Code Online (Sandbox Code Playgroud)

c# asp.net visual-studio-2012

1
推荐指数
1
解决办法
2万
查看次数

标签 统计

asp.net ×1

c# ×1

visual-studio-2012 ×1