using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public class AjaxWindowBase : System.Web.UI.Page { private string scriptOut = ""; public void OutputScript(string val) { scriptOut = val; } private string _RelativePath; public string RelativePath { get { if (_RelativePath == null) _RelativePath = (Page.Request.ApplicationPath.Length == 1 ? "" : Page.Request.ApplicationPath); return _RelativePath; } } protected override void Render(HtmlTextWriter writer) { if (scriptOut.Length > 0) writer.Write(scriptOut); else base.Render(writer); } }