i used sessions on this playing the username in parameters, but i want to remove this session and put asp.net paramters
private void Populate()
{
string Populatebooks = "GetUserPOSTS";
using (SqlConnection con = new SqlConnection(constring4))
{
con.Open();
using (SqlCommand cmd = new SqlCommand(Populate, con))
{
cmd.CommandType = CommandType.StoredProcedure;
--> cmd.Parameters.AddWithValue("@UserName", Session["userName"]);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
sda.Fill(dt);
ViewState["DataTable"] = dt;
GetAll.DataSource = dt;
GetAll.DataBind();
I am using form authentication.