How To Update A Column In A DataGrid Using C#.NET? I am getting InvalidCastException as (Specified cast is not valid) while updating 2nd column in a datagrid? Id,firstname,lastname are the three columns of my datagrid respectively. I wanted to edit the second column(lastname) and update it. I did the following code in DataGrid's updatecommand(),but failed to update ! Int varid=(int)DataGrid1.DataKeys[e.Item.ItemIndex]; TextBox lnm=(TextBox)e.Item.Cells[2].Controls[0]; string str=lnm.Text ; SqlCommand cmd=new SqlCommand("update customer set lastname='" + str + "' where id=" + varid + "",con); cmd.ExecuteNonQuery(); DataGrid1.EditItemIndex=- 1; DataGrid1.DataBind();
2 16138Post New Mind Tree ADO.NET Interview Questions
pls send me interview question paper with answer of EIL/AAI/UPSC/RPSC because i am doing prepration of compitation exam of UPSC for the Asst. Executive Engineer
Is .net core managed code?
Define absolute co-ordinates?
What is the one thing that you regret?
What the sp register does in a program?
Explain the function module in bdc?
what is works contract tax? if a contractor made a bill as repairs to machinary 00000000/- service tax 12.36% on 40% on basic value Vat 5% on 60% of the basic value of the bill amount how can i deduct works contract tax? please suggest me?
What is ispostback method in asp.net? Why do we use that?
What is the importance of offcycle payroll?
Explain how you can debug and test your SAS program?
Does any one have SAP basis B1 Resume format for 4 to 5 year experience? if any one have please send me on kishorekharche@gmail.com
What is advantage of pointer in c?
What are the components of the monetary policy of rbi?
What is a hint?
Define What is the distance between railway tracks?