首页  :: 新随笔  :: 订阅 订阅  :: 管理

GridView的RowCommand~

Posted on 2007-07-07 09:04  礼拜一  阅读(478)  评论(0编辑  收藏  举报
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    
{
        
if (e.CommandName == "checklink")
        
{
            changecss();
            changegridviewcolor();
            ((LinkButton)e.CommandSource).CssClass 
= "hong";
            
string cdealername = ((LinkButton)e.CommandSource).Text;
            GridViewRow row 
= (GridViewRow)((Control)e.CommandSource).NamingContainer;
            
string cdealercode = ((Label)row.FindControl("Label1")).Text.ToString();
            lb_cdealer_name.Text 
= "<a href=\"http://business.it168.com/cdealer/files/billboard.asp?cDealer_code=" + cdealercode + "\" target=\"_blank\">" + cdealername +"</a>";
            price_modify_list(cdealercode);
            price_new_list(cdealercode);
            view_friends_list(cdealercode);
            dealer_qd_cx_zp(cdealercode);
        }

    }