我有一個問題,我的Asp.net GridView中的超鏈接字段沒有接受將會打開一個彈出對話框的Javascript函數。將HyperLinkField設置爲Javascript Url
我使用下面的代碼片斷
<asp:GridView>
<asp:HyperLinkField
DataTextField="SomeColumn" HeaderText="Some Column Text"
SortExpression="SomeColumn"
HeaderStyle-HorizontalAlign="Left"
DataNavigateUrlFormatString="javascript:LaunchSomePopupdialog({0})"
DataNavigateUrlFields="Id"
ItemStyle-Font-Underline="true" />
</asp:GridView>
然而,當我使用頁面的URL,它的工作原理,如:
DataNavigateUrlFormatString="~/SomeOtherPage.aspx?Id={0}"
有沒有一種辦法可以讓這個工作,我的JavaScript功能?