views:

1512

answers:

2

How can I display a field that is a multi line text box in a sharepoint webpart?

when i click "modify shared webpart" on the webpart i would like the text field to me a multi line box

thanks

+3  A: 

Something like

var textBox = new TextBox();
textBox.TextMode = TextBoxMode.MultiLine;
TFD
+2  A: 

You'll also have to write your rendering to be sensitive to what mode you're in:

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