Quotes on call

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Consider the following piece of code: OnClientClick='<%#Eval("url",
"openWindow({0})")%>'
How will I place quotes on the call to openWindow. If I run the code now,
the result will be: OnClientClick="openWindow(someUrl)" where I would like
it to be "openWindow('someUrl')"

(someUrl must be passed as a string instead of a variable)
 
use OnClientClick='<%#Eval("url","openWindow(''{0}'')")>'

This is how it should work - I do not remember exactly though.

- Abhijeet Dev
Andale Inc.
 
I tried the solution given to me, but it gave me a compilation error.
Got any other ideas?
 
Back
Top