jqueryの専門家にとっては非常に簡単な小さな質問があります。http://aspdotnetcodebook.blogspot.com/2010/01/page-languagec-autoeventwireuptrue.htmlに従って、グリッドビューの行のダブルクリックでアクションを実行できるようにしています。(例に示すように)別のページにうまくリダイレクトできますが、 $(this).find("a").click(); を引き起こすことはできません。発砲する。以下は私の GridView マークアップです。
<asp:GridView ID="gvCustomers" runat="server" DataSourceID="odsCustomers" CssClass="datagrid"
GridLines="None" AutoGenerateColumns="False" DataKeyNames="Customer_ID" PageSize="3"
AllowPaging="True" AllowSorting="True" OnRowCommand="gvCustomers_RowCommand"
OnRowDataBound="gvCustomers_RowDataBound">
<Columns>
<asp:BoundField DataField="Customer_ID" HeaderText="ID" ReadOnly="true" Visible="false" />
<asp:BoundField DataField="Customer_FirstName" HeaderText="First Name" ReadOnly="true" />
<asp:BoundField DataField="Customer_LastName" HeaderText="Last Name" ReadOnly="true" />
<asp:BoundField DataField="Customer_Email" HeaderText="Email" ReadOnly="true" />
<asp:BoundField DataField="Customer_Mobile" HeaderText="Mobile" ReadOnly="true" />
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="lnkButton" runat="server" CommandName="showVehicles" CommandArgument='<%# Eval("Customer_ID") %>'
></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
Sorry No Record Found.
</EmptyDataTemplate>
</asp:GridView>
著者が提案したように機能させることはできません: /* または、トリガーできる行 (Text="" または設定されていない) に非表示の LinkButton を含めることができます。CommandName="Something" と CommandArgument="RecordId" を必ず設定してください */
linkButton の OnCommand には、起動したいサーバー側のメソッドがあります。どんなアイデアでも大歓迎です。
ありがとう、アリ