Sunday, April 11, 2010

SqlDataAdapter To Retrieve Multiple Rows

SqlDataAdapter a = new SqlDataAdapter();
a.InsertCommand= new SqlCommand("INSERT INTO TheTable (column1, column2) VALUES (@param1, @param2)", connection);
a.InsertCommand.Parameters.Add("@param1", SqlDbType.NVarChar, 50, "column1");
a.InsertCommand.Parameters.Add("@param2", SqlDbType.NVarChar, 50, "column2");
a.Update(yourDataTable);


Action Method in Mvc

In this section, you will learn about the action method of controller class. All the public methods of a Controller class are called Act...