在SharePoint Web部件中的多行文本框

3

如何在SharePoint WebPart中显示多行文本框字段?

当我在WebPart上点击“修改共享WebPart”时,我希望文本字段是多行文本框。

谢谢。

2个回答

5

类似于以下内容:

var textBox = new TextBox();
textBox.TextMode = TextBoxMode.MultiLine;

2

您还需要编写渲染器以对您所处的模式进行敏感处理:

if( (WebPartManager.DisplayMode == WebPartManager.DesignDisplayMode) || 
    (WebPartManager.DisplayMode == WebPartManager.EditDisplayMode) ) {
       //Show your textbox
} else {
       //Render as text
}

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接