modalpopupextender and commas appearing in my textbox asp.net

后端 未结 15 587
失恋的感觉
失恋的感觉 2020-12-24 05:07

Some weird stuff is happening, I am converting an application that used to use javascript to open another web page in a tiny window for data input to use a ModalPopupExtende

15条回答
  •  自闭症患者
    2020-12-24 05:51

    I also found a forum indicating that it may be standard html behaviour for when there are multiple controls on the form with the same name. This in mind (and assuming there is a bug in the ajax controls) The way I coded around it was to add in my Page_Load the following kind of statement for each of my textboxes.

    string[] vals = txtValue.Text.Split(Convert.ToChar(",")); txtValue.Text = vals[vals.Length - 1];//It appears my latest value was always in the last item

    Since the form load happens before the button event I sort out my fields before they get to the event that deals with their values.

提交回复
热议问题