Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Using webpart properties in Visual webpart

$
0
0

Hi,

I have a visual webpart in SP 2013 (Server object model). In the webpart properties, I have the below:

<property name="Title" type="string">Search</property><property name="Description" type="string">Custom Web Part</property><property name="Step Description" type="string">text</property><property name="Step Text" type="string">Image</property>

I want to access the "Title", "Step Description" and "Step Text" in cs code. How to retrieve the value using C#.

Also, in the property type "string", what is the maximum characters to be used. Is there a property like the "Note" field.

[Update]

If a webpart property is created as below:

 [WebBrowsable(true),
        WebDisplayName("Step Header"),
        WebDescription("Heading text"),
        Personalizable(PersonalizationScope.Shared),
        Category("Custom Properties")]
        public string StepHeader { get; set; }

Can the above be used as "Multiple lines of text".

Thanks



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>