How to display data from database into textbox, and update it

后端 未结 4 1923
难免孤独
难免孤独 2020-12-15 02:08

I can display my data in my textbox, dropdownlist after retrieve data from sql database, but when i proceed with my update button, the information edited in the textbox or d

4条回答
  •  不知归路
    2020-12-15 02:31

    Wrap your all statements in !IsPostBack condition on page load.

    protected void Page_Load(object sender, EventArgs e)
    {
       if(!IsPostBack)
       {
          // all statements
       }
    }
    

    This will fix your issue.

提交回复
热议问题