错误 65 类型“SelectCondition”已定义了一个名为“Page_Load”的具有相同参数类型的成员

liaozhaojian 2011-08-30 09:44:21
错误 65 类型“SelectCondition”已定义了一个名为“Page_Load”的具有相同参数类型的成员
错误 68 类型“SelectCondition”已定义了一个名为“DataBindToGridview”的具有相同参数类型的成员
错误 69 类型“SelectCondition”已定义了一个名为“ImageButton4_Click”的具有相同参数类型的成员
三个错误
红色标记为错误地方

求解
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class SelectCondition : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ZWL.Common.PublicMethod.CheckSession();
DataBindToGridview();
}
}
public string GetTypeStr()
{
try
{
if (Request.QueryString["GetType"].ToString() == "My")
{
return " and UserName='" + ZWL.Common.PublicMethod.GetSessionValue("UserName") + "' ";
}
else
{
return "";
}
}
catch
{
return "";
}
}
public void DataBindToGridview()
{
try
{
string GetTable = Request.QueryString["GetTable"].ToString();
ZWL.DBUtility.DbHelperSQL.BindGridView("select CanShuName as SelectContent from "+GetTable+" where TableName='" + Request.QueryString["TableName"].ToString() + "' and LieName='" + Request.QueryString["LieName"].ToString() + "' and CanShuName like '%" + this.TextBox1.Text + "%' " + GetTypeStr(), this.GridView1);
}
catch
{
ZWL.DBUtility.DbHelperSQL.BindGridView("select distinct " + Request.QueryString["LieName"].ToString() + " as SelectContent from " + Request.QueryString["TableName"].ToString() + " where " + Request.QueryString["LieName"].ToString() + " like '%" + this.TextBox1.Text + "%' " + GetTypeStr(), this.GridView1);
}
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.GridView1.PageIndex = e.NewPageIndex;
DataBindToGridview();
}
protected void ImageButton4_Click(object sender, ImageClickEventArgs e)
{
DataBindToGridview();
}
}





...全文
457 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
IHandler 2011-08-30
  • 打赏
  • 举报
回复
你这个是partial class
有没有另外一个文件,相同类名,具有相同成员?
liaozhaojian 2011-08-30
  • 打赏
  • 举报
回复
<%@ Page Language="C#" AutoEventWireup="true" Inherits="SelectCondition" Codebehind="SelectCondition.aspx.cs" %>
但是我就是没找到哪里有重复
w290601645 2011-08-30
  • 打赏
  • 举报
回复
检查是否有2个SelectCondition页面。。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SelectCondition.aspx.cs" Inherits="SelectCondition" %> 其他页面是否存在相同CodeFile 或者 Inherits
子夜__ 2011-08-30
  • 打赏
  • 举报
回复
SelectCondition这个类里的成员是不是重复了

bdmh 2011-08-30
  • 打赏
  • 举报
回复
看看还有其他SelectCondition 类中有了一样的声明

62,067

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧