I'm trying to create a div in codebehind using an existing div with classes and css styling attached.
The code needs to take variables declared in c#, and generate a div using the existing classes in order to apply the correct styling.
I've tried passing the variables directly to javascript which works, but has a few issues, I've tried using scriptmanager to pass the variables to a javascript function but as soon as I pass more than one variable i get SyntaxError: missing ")".
So i figured the best method would be to create the div in codebehind, but I am yet to find a method that actually works.
Lets say the ideal layout is made up of nested divs.
<div id="main" class="wrapper row-fluid">
// the divs that need to be generated
<div class="infoContainer column">
<h4 class="headText">  Var1-Var2</h4>
<div class="innerLeft">
<img src="Images/placeholder1.png" />
<p>Var3</p>
<p>Var4</p>
<p>Var5</p>
</div>
<div class="innerRight">
<img src="Images/Placeholder2.png" style="padding-right: 20px;" />
</div
</div>
</div>
and the variables that are declared in code behind, which will be
var var1;
var var2;
var var3;
var var4;
var var5;
for now.