<asp:TextBox ID="tb" runat="server" SkinID="forFormSingleLine" ReadOnly="true"></asp:TextBox>
<asp:Button ID="btn" runat="server" Text="Button" onclick="btn_Click" Visible="false" />
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{

tb.Attributes[
"onclick"] = "window.showModalDialog(\"http://www.cnblogs.com/PublicInfo/FrmContractListDlg.aspx"
+ " \",\" \",\"status:false;dialogWidth:800px;dialogHeight:530px\");";
tb.Attributes[
"onclick"] += ClientScript.GetPostBackEventReference(btn, null);
}
}



protected void btn_Click(object sender, EventArgs e)
{
        //to do smth...
      }
posted on 2011-05-24 13:53  pchgo  阅读(796)  评论(0编辑  收藏  举报