コード例 #1
0
    public string GetScriptName(string rname)
    {
        string resource = "PX.Web.Customization.Controls.cseditor." + rname;
        string url      = ClientScript.GetWebResourceUrl(typeof(Customization.WebsiteEntryPoints), resource);

        url = url.Replace(".axd?", ".axd?file=" + rname + "&");
        return(HttpUtility.HtmlAttributeEncode(url));
    }
コード例 #2
0
        /// <summary>
        ///    Initializes a new instance of the <see cref="T:p5.ajax.core.AjaxPage"/> class.
        /// </summary>
        public AjaxPage()
        {
            // Making sure we initialize all the necessary stuff during Load event of page.
            Load += delegate {
                // Determining if we should create an Ajax filter or an HTML filter for rendering our response.
                if (IsAjaxRequest)
                {
                    // Rendering JSON changes back to the client, by making sure we use the correct Response filter.
                    Response.Filter = new JsonFilter(this);
                }
                else
                {
                    // Rendering HTML back to client, by making sure we use the correct Response filter.
                    Response.Filter = new HtmlFilter(this);

                    // Making sure we include "manager.js", which is the main client-side parts of p5.ajax.
                    IncludeJavaScriptFile(ClientScript.GetWebResourceUrl(typeof(AjaxPage), "p5.ajax.javascript.manager.min.js"));
                }
            };
        }
コード例 #3
0
ファイル: BasePage.cs プロジェクト: petvetbr/Symplified.Auth
        private void InitControls()
        {
            _main    = new Panel();
            _main.ID = "mainPanel";

            Controls.Add(new LiteralControl("<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine));
            Controls.Add(new LiteralControl("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\r\n\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">" + Environment.NewLine));
            _head       = new HtmlHead();
            _head.Title = _titleText;
            _head.Controls.Add(GetEncodingMeta());

            HtmlLink cssLink = new HtmlLink();

            cssLink.ID = "mainCSS";
            cssLink.Attributes.Add("rel", "stylesheet");
            cssLink.Attributes.Add("type", "text/css");
            cssLink.Attributes.Add("href", ClientScript.GetWebResourceUrl(GetType(), "dk.nita.saml20.Protocol.Resources.DefaultStyle.css"));
            _head.Controls.Add(cssLink);

            Controls.Add(_head);
            Controls.Add(new LiteralControl("<body>"));

            _body    = new Panel();
            _body.ID = "bodyPanel";

            _header    = new Panel();
            _header.ID = "headerPanel";

            _footer    = new Panel();
            _footer.ID = "footerPanel";

            _main.Controls.Add(_header);
            _main.Controls.Add(_body);
            _main.Controls.Add(_footer);

            Controls.Add(_main);

            Controls.Add(new LiteralControl(Environment.NewLine + "</body>" + Environment.NewLine + "</html>"));
        }