Set UrlEvaluationMode globally for a control
I have a custom class which inherits from DynamicContentView...so I'd like to put some code in there to tell the control to ALWAYS render in UrlEvaluation mode QueryString.
Problem is, there's no setter on the property so I can't?
Hi,
This is how the get for UrlEvaluationMode internally works:
public
UrlEvaluationMode UrlEvaluationMode
get
if
(
this
.Page !=
null
)
var urlEvalMode =
this
.Page.Items[RouteHandler.UrlEvaluationModeKey];
if
(urlEvalMode !=
null
)
return
(UrlEvaluationMode)urlEvalMode;
return
default
(UrlEvaluationMode);
this
.Page.Items[RouteHandler.UrlEvaluationModeKey]
public
class
CustomContentView : DynamicContentView
protected
override
void
InitializeMasterView()
this
.Page.Items[RouteHandler.UrlEvaluationModeKey] = UrlEvaluationMode.QueryString;
base
.InitializeMasterView();