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, ...Skin Control Language - C# v. VBSkin Control Language - C# v. VB
Previous
 
Next
New Post
7/6/2013 4:25 PM
 

OK, a bit of a newbie, here, so I'll try not to ask too many dumb questions. Also, most of my non-DNN development is done using C#/MVC4/Razor so you can imagine my brain is a bit addled at the moment.

Anyway, I've been running a few tutorials that are floating around the interwebs and I'm seeing most of them using VB declared in the .ascx files for the skin. I don't have anything against VB personally, just more comfortable with using C#...but when I change the control language to c#, I start running into issues.

For instance, <code><%=skinpath%></code> works like a champ when vb is the control language, however, when I switch to c# I receive an error that "skinpath is not in the current context".

Is there a resource out there that shows how to write a skin in c# that utilizes the DNN objects like skinpath?

I appreciate any suggestions the community makes...

Ric

 
New Post
7/8/2013 3:42 AM
 
it should work the same in both languages but you need to include same libraries.

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/2013 5:30 AM
 

Ric,

I always say that the only dumb question in the world is the one you don't dare to ask - you'll never get an answer to it and you'll never solve the problem, so _that_ is dumb.

I think - and this is only a presumption - that you have to use VB in the skin's ascx files. I experienced quite the same effects you described, and my conclusion was that this part of DNN was not moved to C# because of compatibility issues with older skins. Maybe I am wrong, but as it worked with VB, I used VB where I needed it (and even me, I am more comfortable with C#).

Hope that helps.

@Sebastian: Which "same libraries"?

Best wishes
Michael


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
7/8/2013 6:02 AM
 
Is this just because you moved to CS - which is case sensitive? So you need it to say SkinPath?

VB is not case sensitive so it's OK with skinpath.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
7/8/2013 11:36 AM
 

Richard,

"SkinPath" was the key...that's where my newbie status comes into play. Of course, C# is case sensitive, but when looking at vb all day in the case of the examples, it didn't even occur to me that the "SkinPath" variable had any specific casing to it.

Just out of curiosity, is there any resource out there that shows these variables and their appropriate casing? I've got the Host manual that I downloaded from DNN, but haven't seen anything obvious in the 1100 pages as of yet.

Thanks again,
Ric

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Skin Control Language - C# v. VBSkin Control Language - C# v. VB


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