日期:2014-05-17 浏览次数:20690 次
protected void btnEditCommand(object sender, CommandEventArgs e)
{
string url = "CategoryEdit.aspx?ID=" + e.CommandName.ToString();
string strCommand = "window.showModalDialog("+url+", window, \"dialogHeight: 330px; dialogWidth: 400px;edge: Raised; center: Yes; help: No; resizable: No; status: No\")";
string strCommandTest = @"window.showModalDialog(CategoryEdit.aspx');";
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", strCommand, true);
}
<asp:Button ID="btnEdit" runat="server" Text="编辑" CommandName='<%#Eval("ID") %>' OnCommand="btnEditCommand"/>