how to delete while i pass two arguments in commant argument

May 21 2019 6:37 AM
hi friends
i need to delete from command arguments id
i already searched in web they using split(| ) i don't understand tel me!!!!
how i doo????
  1. <asp:LinkButton ID="lnk_delete" runat="server" OnCommand="lnk_btn_delete_Menu_Access" CommandArgument='<%#Eval("N_LINK_ID")+","+Eval("N_ID")%>' Text="DELETE">  
  2. </asp:LinkButton>  
how can i get a IDs from command arguments
  1. protected void lnk_btn_delete_Menu_Access(object sender, CommandEventArgs e)  
  2. {  
  3. int id = Convert.ToInt32(e.CommandArgument); // here is comes get one cmd arg ID  
  4. sqlParams = new DL.SQLParams();  
  5. sqlParams.Add("@VC_ACTION", SqlDbType.VarChar, "DELETE");  
  6. sqlParams.Add("@N_ID", SqlDbType.VarChar, id);  
  7. dbUtility.ExecuteCommand(Procedure.USP_MENU_ACCESS, sqlParams.GetParams);  
  8. }  
it will gets i could easly perform delete opertation

Answers (1)