日期:2014-05-17 浏览次数:20457 次
<asp:GridView ID="GridView1" runat="server" Height="208px" Width="499px">
<Columns>
<asp:TemplateField HeaderText="EID">
<ItemTemplate>
<asp:Label ID="lableeid" Text=<%# Eval("EID") %> runat="Server" Visible="false"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Titlen">
<ItemTemplate>
<asp:LinkButton ID="EssayInTo" Text=<%#Eval("Titlen")%> runat="Server"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete" >
<ItemTemplate>
<asp:LinkButton ID="EssayDelete" Text="删除" OnClick="clickdelete( <%#Eval('EID') %> )" runat="Server"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
namespace YangyBlog.Web
{
public partial class EssayItem : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["LoginId"] == null)
{
Response.Redirect("Login.aspx");
}
EssayManger em = new EssayManger();
GridView1.Columns[1].HeaderText = "日志";
&nbs