The simplest way of achieving this;
using System.Data.SqlClient;
using System.Data
Page_Load()
{
SQLConnection con = new SQLConnection();
SQLCommand cmd;
SQLDataAdapter adap = new SQLDataAdapter();
DataTable ds = new DataTable();
con.connectionstring = "";
con.open();
cmd = con.CreateCommand();
cmd.commandType = CommandType.Text;
cmd.CommandText = "select * from....";
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "sp_LoginDetailsProcess....";
cmd.Parameters.Clear();
cmd.parameters.addwithvalue("ParameterName", "ParameterValue");
adap.selectcommand = cmd;
adap.fill(ds);
con.Close();
}
I would recommend you to put this in to a separate class with different properties if using at many different places. This would be easy to maintain.
--Cheers
Nayan