Simple classic ASP with a code behind public property might look like this...
Somewhere in the Module Code Behind: view.ascx.cs
private bool _ShowPager = false; // typically you will set this value in your modules Page_Load event based on a module setting
public bool ShowPager
{
get { return _ShowPager; }
set { _ShowPager = value; }
}
Somewhere in the Module view.ascx Code:
<%if (ShowPager) {%>
<%}%>
One all code behind alternative would be to place a asp literal control on the module's view.ascx and populate it's Text property with markup by a function called from the Page_Load event whereby there would be no classic asp.net with the brackets on your view.ascx. You would however be then forced to build the UI HTML code via server side logic which can also get a little bit ugly. Really it's a case by case scenario in my book and if something is working and not a security or performance problem, that is probably the most important.
With a literal somewhere on the modules view.ascx such as:
When using a literal the modules view.ascx.cs Page_Load would look something like:
protected void Page_Load(object sender, EventArgs e)
{
.....
if(DotNetNuke.Security.PortalSecurity.IsInRole("Chasmont Staff") ){
ltlMyCode.Text = "