我想通过后台的一个事件方法调用另一个事件方法,请问怎么实现,主要事件方法都有事件参数,不知道怎么弄
解决方案 »
- 求救 Server Error in '/' Application.
- 后台管理的frame刷新问题
- 急!急!急!高手帮忙啊!字符串大写转换问题(在线等)
- 有谁知道ie7.0中文版for xp的地址呢?
- panel中控件位置的问题.搞了很长时间,还是弄不了啊!!!!!!!!!!!!
- 如何将一套C/S模式的应用软件系统升级为B/S模式
- 將一個listbox里面的值加到另一個listbox里面??
- ASP.NET期末作业
- datagrid自身有个页码分页,我能不能在页码前加个‘第’字在页码后加个‘页’字?谁有办法?
- 求教:C#中如何让太长的字符串分成多行表述呢?
- 求一段判断textbox里的字符的javascript
- 文件上传控件
为ImageButton1注册事件
protected void Page_Load(object sender, EventArgs e)
{
ImageButton1.Click += new ImageClickEventHandler(Button1_Click);
}
protected void Button1_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(this.GetType(), "script", "alert('You Clicked the button');", true);
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
string strValue = "ABC";
}
这样,点击ImageButton1之后就会同时执行 ImageButton1_Click和Button1_Click两个事件
{
AAAA(1);
BBBB(2);
}
protected void Button2_Click(object sender, EventArgs e)
{
BBBB(2);
}
//事件1
protected void AAAA(int i){}
//事件2
protected void BBBB(int i){}
btn.Name="Button1"
btn.Location=new Point(100,200);
btn.Click += new EventHandler(this.btn_Click);
this.Controls.Add (btn);
private void btn_Click(object sender, System.EventArgs e)
{
Button btn= (Button)sender; }