ImageButton是属于哪个命名空间的?

Saunterer 2006-06-23 09:21:01
protected System.Web.UI.WebControls.ImageButton b1;
这样是错的
...全文
191 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
ImageButton 类
显示图像并对图像上的鼠标单击作出响应的控件。

命名空间:System.Web.UI.WebControls
程序集:System.Web(在 system.web.dll

从2005 MSDN copy的
Saunterer 2006-06-23
  • 打赏
  • 举报
回复
就是这个报错index.aspx.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Data.OleDb;
namespace IndexPage{
public class page1 : System.Web.UI.Page {
protected System.Web.UI.WebControls.Label l1;
protected System.Web.UI.WebControls.TextBox username;
protected System.Web.UI.WebControls.Label l2;
protected System.Web.UI.WebControls.TextBox password;
protected System.Web.UI.WebControls.Label l3;
protected System.Web.UI.WebControls.TextBox vercode;
protected System.Web.UI.WebControls.ImageBotton b1;//这里开始就报错
protected System.Web.UI.WebControls.ImageBotton b2;
protected System.Web.UI.WebControls.TextBox keyword;
protected System.Web.UI.WebControls.ImageButton b3;

private void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack){
username.Text="输入你的用户名";
}
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e){
InitializeComponent();
base.OnInit(e); }
private void InitializeComponent(){
this.Button1.Click += new
System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);}
#endregion

}
}
疯狂秀才2018 2006-06-23
  • 打赏
  • 举报
回复
UP,没有错啊
jc15271149 2006-06-23
  • 打赏
  • 举报
回复
private System.Web.UI.WebControls.ImageButton ib = new ImageButton();
Saunterer 2006-06-23
  • 打赏
  • 举报
回复
报错:
The type or namespace name 'ImageBotton' does not exist in the class or namespace 'System.Web.UI.WebControls' (are you missing an assembly reference?)
sapiential 2006-06-23
  • 打赏
  • 举报
回复
命名空间System.Web.UI.WebControls没有错!

62,056

社区成员

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

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

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

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