前台:
<aspinkButton ID="LinkButton1" runat="server" CommandArgument='<#DataBinder.Eval(Container.DataItem,"id")>'>我要报名</aspinkButton>
后台:
protected void dltFandian_ItemCommand(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "SeeDetails")
{
string fandianid = this.dltFandian.DataKeys[e.Item.ItemIndex].ToString();
string chengshiid =
Request.QueryString["id"].ToString();
Response.Redirect("~/fandianxiangxi.aspx?fandianid=" + fandianid + "&id=" + chengshiid);
}
}