Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Inject ActiveTab name - Conditional Statements in C#Inject ActiveTab name - Conditional Statements in C#
Previous
 
Next
New Post
7/8/2015 3:11 PM
 

Hi All,

I recently changed the language at the top of my ascx skin files from vb to C# and need a little help.  I used to be able to conditionally inject either the current tab name or the root parent tab name by using the following statement:

<% If PortalSettings.ActiveTab.Level > 0 Then%>
<%=PortalSettings.ActiveTab.BreadCrumbs(0).TabName %>
<% Else%>
<%=PortalSettings.ActiveTab.TabName %>
<% End If%>

This does not appear to work with C#.  I have searched fairly extensively and cannot find a resource to help.  Does anyone know the equivalent expression in C#?

Many thanks for your help!

Kelly

 
New Post
7/8/2015 3:39 PM
 
why don't you stick with VB? there is no Advantage by switching to C#

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/8/2015 3:46 PM
 
Seconded.

If you really want to do this you need to learn C#. It will take forever if you try to do it by asking for help with every statement.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
7/8/2015 4:19 PM
 

Hi Sebastian! 

Thanks for taking time to answer.  I switched to C# to solve another question I had:  http://www.dnnsoftware.com/answers/ddr-menu-show-children-if-has-children-otherwise-show-siblings

If there is another way to configure a DDR menu to show children if a page has children, otherwise show siblings, I can go back to VB.  I can use separate skins to accomplish this, but prefer to use conditional logic to keep the number of skins to an absolute minimum so as to not confuse clients.

Thanks!
Kelly

 
New Post
7/8/2015 4:29 PM
 

Hi Richard!

Thanks for taking the time to respond.  I won't be asking for help with every statement - just needed help with this one item.  I switched to C# for this project only to implement a user recommended solution to a menu problem I was having: http://www.dnnsoftware.com/answers/ddr-menu-show-children-if-has-children-otherwise-show-siblings

Based on this post: http://www.dnnsoftware.com/forums/threadid/485479/scope/posts/display-title-from-breadcrumb, I assumed it was just a subtle syntax difference that was causing the error with my conditional statement and hoped for an easy assist.  Perhaps that is not the case and I am better creating multiple skins.  Just trying to look out for my non-technical client site administrators by keeping skins to a minimum.

Thanks,

Kelly

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Inject ActiveTab name - Conditional Statements in C#Inject ActiveTab name - Conditional Statements in C#


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out