I am databinding some SQL to a GridView and now want to have a link to a javascript function with 2 parameters, one being another field in the row.
NavigateUrl="javascript:ShowDialogTest('2','<% ((DataRow)Container.DataItem)["SQLItem"] %>')" />
However I cannot get the SQLItem in double quotes because it thinks it’s the end of the NavigateURL. I also cannot have single quotes because it then stops the parameter.
Not sure how I get about this!
A simple workaround would be to bind the
NavigateUrlproperty from code behind, in theOnItemDataBoundevent.