CommandArgument in the Gridview

前端 未结 1 625
耶瑟儿~
耶瑟儿~ 2021-01-17 12:09

I have a gridview like this.



        
1条回答
  •  深忆病人
    2021-01-17 12:42

    try like this

     
      
           
                  
                          
                          
                   
            
       
    

     protected void lnkDelete(Object sender, CommandEventArgs e)
     {
        int iStID=int32.Parse(e.CommandArgument.ToString());
     }
    
     //iStID has the DataKey value which you can use. 
    

    0 讨论(0)
提交回复
热议问题