0

I would to display text entered in a custom web part property onto a form.

This code is to display the custom web part property

 [WebBrowsable(true),
     Category("Miscellaneous"),
     Personalizable(PersonalizationScope.Shared),
     WebDisplayName("Enter some text")]
     public string CustomTextProp { get; set; }

This is the div to display what was entered in the code above

    <div style="margin-bottom:10px;">TEXT USER ENTERED IN WEB PART PROPERTIES</div>

My question is how to I get the text the user entered in the web part property to display in the div?

14
  • should it be showed after saving or right when tiping in? Commented Sep 12, 2014 at 13:40
  • It should be showed after saving Commented Sep 12, 2014 at 13:43
  • and where is this div located? Commented Sep 12, 2014 at 13:45
  • UserItemDisplay.ascx Commented Sep 12, 2014 at 13:49
  • is this a control you created? Commented Sep 12, 2014 at 13:50

1 Answer 1

0

Maybe you should use a Label and in the onLoad method of your webpart you can access this label and write the value of the saved property to its Text.Field.

Or you could in the set-Method of the Property set the .Text of the Label to the value entered to the WebPart Property;

Tell me if you need more help.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.