Setting a textbox value by JQuery

前端 未结 2 2181
小蘑菇
小蘑菇 2021-02-13 16:59

I am setting a TextBox controls value via an ajax post.

$(\'#txtSite\').val(msg.d.SiteName);

This is working and the value of the

2条回答
  •  庸人自扰
    2021-02-13 17:33

    Yes, I definitely think, your text box should have a name attribute in html code, check for it. Without a 'name' attribute browser won't post this input box's data to server and thus you won't get it in server side c# code. Hope, this make sense..

提交回复
热议问题