0
我有一个中继器内的超链接。我想从Nagivate Url调用一些JavaScript,并传入js函数,从databound对象中获取一个属性。将asp.net数据绑定对象参数传递给javascript
<asp:Repeater id="repRecentDocuments" runat="server">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="javascript:getRecentDoc('<%# ((RecentDocs)Container.DataItem).link %>')" Text='<%# ((RecentDocs)Container.DataItem).name %>' />
</ItemTemplate>
</asp:Repeater>
<asp:Button id="btnGetRecent" runat="server" style="display:none" OnClick="GetRecentDocument" />
但物业没有解决,这是在传递的变量的值。
<%# ((RecentDocs)Container.DataItem).link %>
有什么建议?
工作,感谢您的帮助! – baldie