刚学asp.net,想请教怎么在web控件里,后台添加c#代码

刚学asp.net,想请问如何在web控件里,后台添加c#代码?比如,我想添加一个Botton控件点击设计按钮,就能进入到

刚学asp.net,想请问如何在web控件里,后台添加c#代码?
比如,我想添加一个Botton控件



点击设计按钮,就能进入到设计页面了,
代码里面就是这样
刚学asp.net,想请教怎么在web控件里,后台添加c#代码
[解决办法]
引用:
在该控件的点击事件中的代码
    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("Default1.aspx");
    }
或者
    protected void Button1_Click(object sender, EventArgs e)
    {
        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "window.open('Default1.aspx')",true);
    }
此两种方法都可以。

+1