经验杂碎[自己能读懂的]

gridview中的操作  
       <asp:TemplateField HeaderText="首页显示">
           <ItemTemplate>
                <asp:CheckBox ID="CheckBox1" runat="server" Enabled="False" Checked ='<%# Bind("IsPublic") %>'/>
                <asp:LinkButton ID="btnActiveExhibition" runat="server" CommandArgument='<%# Bind("Id") %>' CommandName ="activeExhibition" Enabled = '<%#!Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "IsPublic")) %>' >允许</asp:LinkButton>
                <asp:Label ID="Label2" runat="server" Text="/"></asp:Label>
                <asp:LinkButton ID="btnInactiveExhibition" runat="server" CommandArgument='<%# Bind("Id") %>' CommandName ="LockExhibition" Enabled ='<%# Bind("IsPublic") %>' >禁止</asp:LinkButton>
           </ItemTemplate>
         </asp:TemplateField>

后台操作:
    protected void GridViewExhibtion_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        int m_id;
        m_id = Convert.ToInt32(e.CommandArgument.ToString());
      
        using (CExhibitionManager exbmgr = new CExhibitionManager())
        {
            switch (e.CommandName)
            {
                case "activeExhibition":



     /// <summary>
    /// 返回一个弹出窗口
    /// </summary>
  public static string Show(string strMsg)
  {  
       return String.Format("<script language={1}javascript{1}>alert({1}{0}{1});</script>",strMsg,"\"");
  }
posted @ 2007-07-18 14:08 灯火阑珊²ºº7 阅读(...) 评论(...) 编辑 收藏