请问各位Button控件怎么实现链接?
还有什么控件能实现在链接时能传送数据?

解决方案 »

  1.   

    button不能实现链接,只能通过脚本转向其他页面或到后台用response.redirect("xxx.aspx")的方式转向.
    脚本写法如下:
    this.Button1.Attributes.Add("onclick","window.location.href='xxx.aspx';");还有什么控件能实现在链接时能传送数据?
    --------------------
    象上面那样,在xxx.aspx后面,加参数就可以,
    response.redirect("xxx.aspx?id=3")或者用HyperLink控件
      

  2.   

    .net
    里面提供了LinkButton,
      

  3.   

    <input type="button" value="按钮实现链接" onclick="location.href='page.aspx'>
    链接实现按钮用linkbutton
      

  4.   

    this.Button1.Attributes.Add("onclick","window.location.href='xxx.aspx';");
    如果是这样的话需要注意
    >>this.Button1.Attributes.Add("onclick","window.location.href='xxx.aspx';return false;");