protected void lvTheme_ItemCommand(object sender, ListViewCommandEventArgs e) { string themeId = (lvTheme.Items[(e.Item.DataItemIndex)].FindControl("themeId") as HtmlInputHidden).Value.Trim(); if (e.CommandName == "Link")//点击主题标题链接时触发 { Model.Theme theme = new Model.Theme() { ThemeId = themeId }; if (theme.IsError) { Msg = "参数格式错误"; printMsgToClient(); return; } ThemeManagement.Click(theme.ThemeId); Response.Redirect("~/ThemeDisplay.aspx?themeId=" + themeId + "&path=" + lblPath.Text); } if (e.CommandName == "Del") { Msg = CollectThemeManagement.UncollectTheme(Convert.ToString(Session["memberId"]), themeId); printMsgToClient(); Bind(); } }
protected void lvTheme_ItemCommand(object sender, ListViewCommandEventArgs e) { if (e.CommandName == "Link")//点击主题标题链接时触发 { string themeId = (lvTheme.Items[(e.Item.DataItemIndex)].FindControl("themeId") as HtmlInputHidden).Value.Trim(); Model.Theme theme = new Model.Theme() { ThemeId = themeId }; if (theme.IsError) { Msg = "参数格式错误"; printMsgToClient(); return; } ThemeManagement.Click(theme.ThemeId); Response.Redirect("~/ThemeDisplay.aspx?themeId=" + themeId + "&path=" + lblDivisionName.Text.Trim()); } }