网格视图代码:
<asp:GridView ID="gvVessel" runat="server" AutoGenerateColumns="false" GridLines="None"
EmptyDataText="No Vessels found." OnRowCommand="gvVessel_RowCommand"
OnSelectedIndexChanged="gvVessel_SelectedIndexChanged" DataKeyNames="VesselID" >
<asp:/GridView>
代码背后:
protected void gvVessel_SelectedIndexChanged(object sender, EventArgs e)
{
int index = Convert.ToInt16(gvVessel.SelectedDataKey.Value);
Cache["index"] = index;
Response.Redirect("VesselDraft.aspx");
}
为什么事件没有触发?