我把一個超鏈接的數據列表裏面..問題與超鏈接
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" runat="server">'<%# Eval("ThreadTitle") %>'</asp:HyperLink>
<br />
<br />
</ItemTemplate>
我希望它能夠將其按下,使DataList控件的事件將被觸發並傳遞我到另一頁:
protected void DataList1_SelectedIndexChanged(object sender, EventArgs e)
{
Server.Transfer("AnswerQuestion.aspx?x=" + DataList1.DataKeyField + "&question=" + DataList1.SelectedValue + "&time=" + DateTime.Now);
}
不幸的是,該鏈接似乎被禁用,我不能按它來觸發DataList的Selected事件..
我怎樣才能讓超鏈接是否有效?
一些HTML將是有益的 –
我怎樣html..do做到這一點我寫'<%# Eval("ThreadTitle") %>'<> –
What is currently going to the client? i.e. what does the final HTML currently look like?> –