예제 #1
0
        protected void cmdPreview_Click(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(SkinSrc))
            {
                string strType = SkinRoot.Substring(0, SkinRoot.Length - 1);

                string strURL = Globals.AddHTTP(Globals.GetDomainName(Request)) + Globals.ApplicationURL(_objPortal.HomeTabId).Replace("~", "");
                //detect if there is already a '?' in the URL (in case of a child portal)
                if (strURL.IndexOf("?") > 0)
                {
                    strURL += "&";
                }
                else
                {
                    strURL += "?";
                }
                strURL += "portalid=" + _objPortal.PortalID + "&" + strType + "Src=" + Globals.QueryStringEncode(SkinSrc.Replace(".ascx", ""));

                if (SkinRoot == SkinInfo.RootContainer)
                {
                    if (Request.QueryString["ModuleId"] != null)
                    {
                        strURL += "&ModuleId=" + Request.QueryString["ModuleId"];
                    }
                }

                Response.Write("<script>window.open('" + strURL + "','_blank')</script>");
            }
        }
예제 #2
0
 protected void cmdPreview_Click(object sender, System.EventArgs e)
 {
     if (!String.IsNullOrEmpty(SkinSrc))
     {
         string strType = SkinRoot.Substring(0, SkinRoot.Length - 1);
         string strURL  = Globals.ApplicationURL() + "&" + strType + "Src=" + Globals.QueryStringEncode(SkinSrc.Replace(".ascx", ""));
         if (SkinRoot == SkinController.RootContainer)
         {
             if (Request.QueryString["ModuleId"] != null)
             {
                 strURL += "&ModuleId=" + Request.QueryString["ModuleId"].ToString();
             }
         }
         Response.Redirect(strURL, true);
     }
 }