I am working on ASP.NET web application. In that I have one Edit Information page which has around 40 text-boxes. I need to update the data in the database, so I need to pass the values from all 40 fields into the database.
I am passing 40 parameters to a stored procedure to update data in the database. I need some other way to pass these parameters. Please suggest how to pass multiple parameters to a stored procedure.
Is there any other way to pass data or is it only possible, writing all in parameters list?
Regards, Vivek
sys.parameterssystem table to make writing the code quicker:SELECT 'command.Parameters.AddWithValue("' + Name + '", ' + STUFF(Name, 1, 1, '') + 'TextBox.Text);' FROM sys.parameters WHERE Object_ID = OBJECT_ID(N'dbo.YourProcedureName');