Multi-line text box in sharepoint web part

How can I display a field that is a multi-line text field in a sharepoint web part?

when I click "change shared website" in the web part, I would like the text box to be in a multiple line box

thanks

+3
source share
2 answers

Sort of

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

You will also have to record rendering in order to be sensitive to what mode you are in:

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

Source: https://habr.com/ru/post/1704646/


All Articles