Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've not used DNN, but for what I think you're trying to do, inline expressions should work.</p> <p>In your code-behind have some properties (or methods):</p> <pre><code>protected string ModuleId {get {return "1"; }} protected string ModuleId2 {get {return "2"; }} protected string ControlPath {get { return "path1/"; }} protected string ControlPath2 {get {return "path2/"; }} protected string Content {get {return "somecontent"; }} protected string ControlPath3 {get {return "path3/"; }} </code></pre> <p>then you can use them as follows:</p> <pre><code>&lt;div id="ViewDiscovery_&lt;%= ModuleId %&gt;" &gt;&lt;/div&gt; &lt;script type="text/javascript" src="&lt;%= ControlPath %&gt;carousel-jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="&lt;%= ControlPath2 %&gt;discovery-widget.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { var myData = &lt;%= Content %&gt;; var myDiscovery = discovery('&lt;%= ControlPath3 %&gt;'); myDiscovery.json(myData); myDiscovery.init("ViewDiscovery_&lt;%= ModuleId2 %&gt;"); }); &lt;/script&gt; </code></pre> <p>Should generate the following HTML:</p> <pre><code>&lt;div id="ViewDiscovery_1" &gt;&lt;/div&gt; &lt;script type="text/javascript" src="path1/carousel-jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="path2/discovery-widget.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { var myData = somecontent; var myDiscovery = discovery('path3/'); myDiscovery.json(myData); myDiscovery.init("ViewDiscovery_2"); }); &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload