By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,199 Members | 1,551 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,199 IT Pros & Developers. It's quick & easy.

onclick="toggleDisplay('<%# Eval("description")%>

P: 5
Here is my codes in aspx page:
Expand|Select|Wrap|Line Numbers
  1. <td colspan="2" class="main_menu" runat="server" onclick='toggleDisplay(<%#Eval("description")%>);'><%#Eval("description")%></td>
Here is in "View source":

onclick="toggleDisplay(&lt;%#Eval(&quot;descriptio n&quot;)%>);">Administrator Functions</td>

When putting
Expand|Select|Wrap|Line Numbers
  1. <%#Eval('description')%>
in <td> tag, it understand & show the correct value, but when in
Expand|Select|Wrap|Line Numbers
  1. onclick='toggleDisplay(<%#Eval("description")%>);'>
it didn't understand.
Can any1 give me a solution for this case ? Thank alot !
Oct 25 '07 #1
Share this Question
Share on Google+
4 Replies


Expert 100+
P: 390
The syntax seems ok .
The problem may be somewhere else.
Oct 25 '07 #2

kunal pawar
100+
P: 297
onclick='toggleDisplay("<%#Eval("description")%>") ;'><%#Eval("description")%></td>

try this one,it works
Oct 25 '07 #3

P: 5
To kunal pawar:
Thank for ur help!
i had tried ur codes but it didn't work. Here is the result
Expand|Select|Wrap|Line Numbers
  1. onclick="toggleDisplay(&quot;&lt;%#Eval(&quot;description&quot;)%>&quot;);">
i had tried alots but it still no changed.
Oct 26 '07 #4

kunal pawar
100+
P: 297
Hey u made mistake

onclick=single qute Code single qute
Nov 5 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.