Why does my save use the initial value of my TextBox and not the entered value?

前端 未结 6 1436
遥遥无期
遥遥无期 2021-01-01 16:19

I have a textbox on my website:


On page l

6条回答
  •  独厮守ぢ
    2021-01-01 16:51

    I think its because PostBack

    If you're calling setCoordinates() on some button's click event textbox's new value will be lost. If that's right change Page_Load like this one

    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            Latitude.Text = thisPlace.Latitude;
        }    
    }
    

提交回复
热议问题