R
Randy
Hi,
I am trying to do something like this:
<asp:Button ID="cmdExploder" runat="server"
OnClientClick='javascript:ButtonPressed(<%# Container.DataItem %>);'
Text="testing" />
Of course this is a little simplistic. Assume this code is in a
datalist and the databinding will be the primary key of some record.
The purpose is to give the client side javascript the ID.
The problem I am having is that I can't figure out how to wrap the <%#
%> stuff properly with quotes or whatever. It doesn't actually databind
it just shows the literal in the page source.
Any thoughts?
thanks in advance.
Randy
I am trying to do something like this:
<asp:Button ID="cmdExploder" runat="server"
OnClientClick='javascript:ButtonPressed(<%# Container.DataItem %>);'
Text="testing" />
Of course this is a little simplistic. Assume this code is in a
datalist and the databinding will be the primary key of some record.
The purpose is to give the client side javascript the ID.
The problem I am having is that I can't figure out how to wrap the <%#
%> stuff properly with quotes or whatever. It doesn't actually databind
it just shows the literal in the page source.
Any thoughts?
thanks in advance.
Randy