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, ...howto get path to image for runat=server asp controls in skin ?howto get path to image for runat=server asp controls in skin ?
Previous
 
Next
New Post
2/20/2010 2:31 PM
 
Adam Sida wrote:

Timo,

please see this article, syntax U describe is NOT allowed within attribute list of runat=server tag!!

any other usefull hint ?

This works, so that's why I posted it:

<dnn:TEXT runat="server" id="dnnTEXT"  CssClass="breadcrumb_text" Text="<%#SkinPath%>" ResourceKey="Breadcrumb" />

Are you saying it does not work in the attributes of the menu you use?

 
 
New Post
2/20/2010 2:39 PM
 

For some reason it does not work in the menu directly, but I managed it using this:

<script runat="server">
 function GetPath() as string
    Return SkinPath & "test.gif"
 end function
</script>

 

<dnn:TREEVIEW runat="server" id="dnnTREEVIEW" level="root"  TreeIndentWidth="2"  ForceDownLevel="True" NodeCollapseImage="<%#GetPath%>" />

 

 
New Post
2/20/2010 2:42 PM
 

And here's an article that show this is allowed.

http://support.microsoft.com/kb/30786...

Sorry, wrong link, will look for the right one.

http://www.15seconds.com/Issue/040630...

<asp:Label id="label1" runat="server"
Text='<%# Container.DataItem("CustomerName") %>'

"However, any valid expression that returns a value can be used in a data binding statement. And the same syntax can, of course, be used outside list controls. For example, it can be used to display a value directly in the page, or as the value of an attribute for any other server control."

 
New Post
2/21/2010 2:31 AM
Accepted Answer 

Timo,

1. I am apologies for syntax U describe is NOT allowed within attribute list of runat=server tag, because it IS SUPPORTED, sorry again

now to have complete this issue see what works for me:

<!-- workaround script for dnnTreeView -->
<script runat="server">
 String GetPath()
 {
    return SkinPath;
 }
</script>

...

  <div id="LeftPane" runat="server" class="TreeViewMenu_Body">
    <dnn:TREEVIEW runat="server" id="dnnTREEVIEW"
      level="root" 
...
      ForceDownLevel="True"
      NodeCollapseImage='<%# GetPath()+"minusBig.gif" %>'

my page lang is C#, so I turned your function into it. Please note that attribute NodeCollapseImage MUST have ' single quote enclosing' in this case.

Note: Image file name MUST be either append like example above or sent as param to function, but definitelly U CAN'T do something like:

NodeCollapseImage='<%# GetPath() %>minusBig.gif'

Despite to most horrible syntax I've ever seen, thanx for help and if anybody can set this thread as resolved please do it (I can't see button).

Thanx again

Adam

 
New Post
2/21/2010 5:03 AM
 

Good to hear it's "solved", and your right the syntax is not very clean.

Timo

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...howto get path to image for runat=server asp controls in skin ?howto get path to image for runat=server asp controls in skin ?


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