当前位置: 代码迷 >> ASP.NET >> 用户控件中的值怎么传递
  详细解决方案

用户控件中的值怎么传递

热度:9013   发布时间:2013-02-26 00:00:00.0
用户控件中的值如何传递?
我在一个页面中用到了用户控件,里面是一个DataGrid。在这个页面中我想点击DataGrid中的链接把当前行的值写入到页面中的TextBox中。请问在用户控件里面要如何操作才能把值赋给TextBox?

------解决方案--------------------------------------------------------
<a href= "javascript:SetValue( ' <%#DataBinder.Eval(Conatiner.DataItem, "字段 ")%> ') "> //js在aspx中写function SetValue (value){ document.getElementById( " <%=this.TextBox1.ClientID%> ").value = value;}
  相关解决方案