I have a asp.net page with a datalist with a textbox and a button on it, on page load the textbox gets text in it, if I change the text and press the button the text doesn't get updated.
What am I doing wrong?
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable table = CategoryAccess.GetProducts();
ProductList.DataSource = table;
ProductList.DataBind();
}
}
protected void btn_Click(object sender, EventArgs e)
{
string Name = textbox.Text;
CategoryAccess.UpdateProducts(Name);
}
}