Trouble passing eval through a JS function

SirSnagsAlot

New Member
I'm having some problems trying to pass a value from inside of a GridView template to a javascript function.\[code\]OnClientClick='<%# Eval("TicketID", "ViewTicket({0});") %>'\[/code\]The page loads successfully, but clicking the button doesn't seem to fire the jaascript.\[code\]function ViewTicket(TickID) { alert(TickID); $("#TicketDiv").show("slow"); $("#Queue").hide("slow");};\[/code\]After poking around some, it seems that this is the way to do it, but I am pretty new to mixing all of these technologies together, so I'm not sure why this doesn't work, what would work, and why this is/isn't the best method for grabbing a contextual value from a GridView. Any enlightenment you're willing to pass on would be welcome.
 
Back
Top