Posted on: 7/11/2014 5:37:31 PM | Views : 398

Hi 
i have this code which is inserting ads details inside a table but nothing its work as there is no any new record inside the table "UID" should take it value from the session called "UsrNme"
protected void likebtn_Click(object sender, ImageClickEventArgs e) { if (Session["UsrNme"] != null) { string usr = Session["UsrNme"].ToString(); SqlConnection likeCON = new SqlConnection(cs); SqlCommand likecmd = new SqlCommand(); string Likesqlstmt = "INSERT INTO favourite (AdsID,AdsTit,UID) VALUES (@AdsID,@AdsTit, @UID)"; likecmd.Connection = likeCON; likecmd.CommandType = CommandType.Text; likecmd.CommandText = Likesqlstmt; //Insert the parameters first likecmd.Paramet ...

Go to the complete details ...