How to read a (SharePoint) custom web part property before the page loads?
Posted
by Josh
on Stack Overflow
See other posts from Stack Overflow
or by Josh
Published on 2010-04-16T18:00:49Z
Indexed on
2010/04/16
18:03 UTC
Read the original article
Hit count: 258
I have a custom web part in SharePoint that has one property. Here is it:
// Specify report path
private string _report_path = string.Empty;
[WebBrowsable(true),
Personalizable(true),
WebDisplayName("Enter Path"),
WebDescription("Embeds an OBIEE Report in the portal"),
SPWebCategoryName("Report")]
public string ReportPath
{
get { return _report_path; }
set { _report_path = value; }
}
The problem is that, I have to refresh the page manually a second time for the property to get set. Apparently, I need to put the method inside a PreRender event. Does anyone know how I can do this? Thanks.
© Stack Overflow or respective owner