zoukankan      html  css  js  c++  java
  • 写了个简单的IFrame Web Part

        1、主要代码:
        
    protected override void RenderWebPart(HtmlTextWriter output)
            
    {
                
    //output.Write(SPEncode.HtmlEncode(Text));
                output.AddAttribute(HtmlTextWriterAttribute.Width,IFrameWidth);
                output.AddAttribute(HtmlTextWriterAttribute.Height,IFrameHeight);
                output.AddAttribute(HtmlTextWriterAttribute.Src,url);
                output.AddAttribute(
    "marginwidth","0");
                output.AddAttribute(
    "marginheight",marginheight);
                output.AddAttribute(
    "frameborder",frameborder);
                output.AddAttribute(
    "scrollingr",scrolling);
                output.RenderBeginTag(HtmlTextWriterTag.Iframe);
                output.RenderEndTag();
            }
       
        2、安装包及源代码下载: https://files.cnblogs.com/dudu/IFrame.rar 
        3、WebPart安装方法:在SharePoint服务器上运行Setup目录中的Install.bat
        4、开发中遇到的问题:
            开始,我给IFrameWebPart添加了Width与Height属性,编译正常,可是在SPS页面上添加这个WebPart就出错,后来发现是因为Microsoft.SharePoint.WebPartPages.WebPart中已经定义Width与Height属性,IFrameWebPart添加的Width与Height属性与它产生了冲突。
       
  • 相关阅读:
    P1168 中位数(对顶堆)
    P2341 [HAOI2006]受欢迎的牛
    P1967 货车运输
    树状数组的神操作QAQ
    P1063 能量项链
    P1429 平面最近点对(加强版)
    P2571 [SCOI2010]传送带
    4 Values whose Sum is 0
    UVA529 Addition Chains
    UVA307 Sticks
  • 原文地址:https://www.cnblogs.com/dudu/p/108369.html
Copyright © 2011-2022 走看看