2018年1月3日 星期三

asp.net button set textbox text

參考來源: ASP.NET on button click in user control set the value of a textbox in the main page using javascript
---
找好久,原來是要送出 submit


  1. <script type="text/javascript">
  2. function SetPage(a) {
  3. var txtFld = document.getElementById("<%=PageBox.ClientID%>");
  4. txtFld.value = a;
  5. document.forms[0].submit(); // or document.forms['formname'].submit()
  6. return false;
  7. }
  8. </script>

沒有留言:

張貼留言