PANKAJ DURVE

PANKAJ DURVE

  • NA
  • 17
  • 13.8k

Why are use ToString method ?

Sep 9 2014 1:14 AM
Why are use  ToString method ?
 
 For example
cmd = new SqlCommand("Delete from Emp where Empid=" + DataGrid1.DataKeys[e.Item.ItemIndex].ToString(), con); 
 
 
but not use in VB
 
cmd = New SqlCommand("Update Emp Set Empname='" & name.Text & "',EmpAdd ='" & add.Text & "'where Empid=" & DataGrid1.DataKeys(e.Item.ItemIndex), con)
 

Answers (1)