Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net ';selCurrentManuf';未声明。由于其保护级别,可能无法访问_Asp.net_Vb.net_Drop Down Menu - Fatal编程技术网

Asp.net ';selCurrentManuf';未声明。由于其保护级别,可能无法访问

Asp.net ';selCurrentManuf';未声明。由于其保护级别,可能无法访问,asp.net,vb.net,drop-down-menu,Asp.net,Vb.net,Drop Down Menu,我有一个下拉列表,我试图在代码隐藏的sql中使用的id,但我得到错误 未声明。由于其保护级别,可能无法访问 <asp:DropDownList selectedvalue='<%#Container.DataItem("manufidcurrent")%>' ID="selCurrentManuf" Runat="Server" DataTextField="Desc" DataValueField="manufid" DataSourc

我有一个下拉列表,我试图在代码隐藏的sql中使用的id,但我得到错误

未声明。由于其保护级别,可能无法访问

  <asp:DropDownList  
  selectedvalue='<%#Container.DataItem("manufidcurrent")%>' 
  ID="selCurrentManuf" 
  Runat="Server" 
  DataTextField="Desc" 
  DataValueField="manufid"
  DataSource="<%# GetCurrentManuf() %>" 
  autopostback="true" 
  OnSelectedIndexChanged="selCurrentManuf_SelectedIndexChanged"  ></asp:DropDownList>

有时
designer.cs
文件会出错。您可以手动将下拉列表添加到
designer.cs
文件中,或者再次将下拉列表剪切并粘贴到标记中可能会更正此问题

要在
designer.cs
文件中手动声明下拉列表:

/// <summary>
/// selCurrentManuf control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList selCurrentManuf;
//
///自动控制。
/// 
/// 
///自动生成的字段。
///将字段声明从设计器文件修改为代码隐藏文件。
/// 
受保护的全局::System.Web.UI.WebControl.DropDownList selCurrentManuf;

这是一个成熟的SQL注入,你应该考虑使用一个参数化查询。这个文件可能在哪里复制?去解决方案资源管理器并扩展ASPX文件。这个应用程序运行在Web服务器上。我在VSSO中没有开发一个没有IDE的应用程序。我想知道如何做到这一点。没有ide,是在一个上传到服务器中创建的,现在jsut可以访问aspx和aspx.vb文件,而不是项目
/// <summary>
/// selCurrentManuf control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList selCurrentManuf;