Hi all,
I'm trying to access an asp variable in javascript. Here's the snippet of code:
problem when i actually view the source in the web page, I have this instead:
It's treating the <% for my asp variable into less than (<). It's driving me crazy. How do I fix this?
I'm trying to access an asp variable in javascript. Here's the snippet of code:
Code:
<FooterTemplate>
<asp:TextBox ID="txtActivedate" runat="server" Text='01/01/2007' MaxLength="10" Width="70px"></asp:TextBox><input
type="button" runat="server" value="Cal" onclick="displayCalendar(document.getElementById('<%= txtActivedate.ClientID %>'),'mm/dd/yyyy',this);" />
</FooterTemplate>
problem when i actually view the source in the web page, I have this instead:
Code:
</td><td> </td><td>
<textarea name="ctl00$ContentPlaceHolder1$GridView1$ctl05$txtMessages" rows="2" cols="20" id="ctl00_ContentPlaceHolder1_GridView1_ctl05_txtMessages" style="width:400px;"></textarea>
</td><td readonly="true">
<input name="ctl00$ContentPlaceHolder1$GridView1$ctl05$txtActivedate" type="text" value="01/01/2007" maxlength="10" id="ctl00_ContentPlaceHolder1_GridView1_ctl05_txtActivedate" readonly="true" style="width:70px;" /><input name="ctl00$ContentPlaceHolder1$GridView1$ctl05$ctl00" type="button" value="Cal" onclick="displayCalendar(document.getElementById('<%= txtActivedate.ClientID %>'),'mm/dd/yyyy',this);" />
</td><td> </td><td> </td>
It's treating the <% for my asp variable into less than (<). It's driving me crazy. How do I fix this?