我用TOOLBAR做了个用户控件
但是其他页面用的时候
不能调用用户控件的事件函数
怎么回事
但是其他页面用的时候
不能调用用户控件的事件函数
怎么回事
解决方案 »
- gridview里的linkbutton按钮设为不可用
- 页面验证
- GridView控件中如何在底部添加汇总项
- 在操作INSERT到ACCESS 中,怎样返回自增字段ID
- 好久不上csdn今天一登录发现验证码是88888散分
- winform 嵌入网页中,在客户端执行,权限和framework可不可以打包到客户端安装?
- asp.net 导出excel ie无法导出 ff、chrome、opera正常。求解
- 新手高分求一个SQL连接的范例
- 关于DataList的分页问题
- 大家来讨论一下VB.net与c#的比较...
- 请问在什么情况下不执行pageload?
- DATAGRID 模板列中加入imagebutton,如何触发Delete,update事件.
帮我看看怎么回事:
public class AreaUserControl : System.Web.UI.UserControl
{
protected Microsoft.Web.UI.WebControls.Toolbar Toolbar2;
//trasferParameter属性指不同页面传递的参数
public string trasferParameter
{
get{return trasferParameter;}
set{trasferParameter=value;}
}
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Toolbar2.ButtonClick += new System.EventHandler(this.Toolbar2_ButtonClick);
this.Load += new System.EventHandler(this.Page_Load); }
#endregion public void Toolbar2_ButtonClick(object sender, System.EventArgs e)
{
switch(sender.ToString())
{
case "check":
Response.Write("<script>alert('check')</script>");
break;
case "print":
Response.Write("<script>alert('print')</script>");
break;
case "help":
Response.Write("<script>alert('help')</script>");
break;
case "export":
Response.Write("<script>alert('export')</script>");
break;
case "deploy":
Response.Write("<script>alert('deploy')</script>");
break; }
} }
}