I recently posted asking how to pass databound data to a javascript function. With help, I got the results I wanted; however, I ran into another problem immediately after.
<asp:ImageButton ID="ImageButton1" CommandArgument='<%# Eval("MECNUM") %>' runat="server" ImageUrl="printer.png" OnClick="Display_OnClick"
OnClientClick='<%# Eval("MECNUM", "Display_OnClientClick({0})") %>' />
Lets say that MECNUM came to be XYZ. Unfortunately it throws an error, saying XYZ is an undefined variable. What I really want is the string "XYZ" to be passed. Putting XYZ.toString() didn't work as the problem is still variable undefined. Any thoughts?
function Display_OnClientClick(mecnum) {
alert(mecnum);
}
Thanks a ton for the help