private void CreateDialogScript() { StringBuilder sb = new StringBuilder(); sb.Append("var " + this.ID + "=$.dialog({"); sb.AppendFormat("id:'{0}'", this.ID); sb.AppendFormat(",content:'{0}'", (string.IsNullOrEmpty(url) ? Content : "url:" + Url)); sb.Append("});"); Script.AddCss(this.Page, "LHGDialogCss", ClientResourceUrl.LHGDialogCss); Script.AddScript(this.Page, "LHGDialogJs", ClientResourceUrl.LHGDialogJs); Script.RegisterStartupScript(this.Page, "LHGDialog-" + this.ID, sb.ToString()); }