How do I take my C# array and write it to an HTML table header?
From what I've read you should be able to use cnippets to get the variable but it's not working...
C# code
protected void Page_Load(object sender, EventArgs e)
{
string[] tableHeaders = {
"Urgency",
"Picker",
"CARD",
"Case Order",
"CR #",
"Patient",
"Age",
"ASA",
"Anes Consult",
"Procedure",
"Booking Surgeon",
"Operating Surgeon",
"Ready Date",
"Ready Time",
"NPO Since",
"EST Time",
"Current Location",
"Postop Need",
"Booked by",
"Special Equipment",
"Comments"
};
}
HTML Code You'll see in my document.write line I try to call the tableHeaders variable. And I use the javascript row variable as a counter.
<thead>
<tr>
<script type="text/javascript">
for (var row = 0; row <= 21; row++) {
document.write("+<%= tableHeaders[+row+] %>+")
}
</script>
</tr>
</thead>
<th>elements in your row or just write out a list of header names?RegisterArrayDeclaration.