aspx.cs
SqlParameter paraName = new SqlParameter("@Name", SqlDbType.VarChar, 50);
paraName.Value = MainUserControl1.Name;
cmd.Parameters.Add(paraName);
in ascx.cs
public string Name
{
get
{
return txtFname.Text;
}
set
{
txtFname.Text = value;
}
}
this s the code to save values in database,