我在一个页面中用到了用户控件,里面是一个DataGrid。在这个页面中我想点击DataGrid中的链接把当前行的值写入到页面中的TextBox中。请问在用户控件里面要如何操作才能把值赋给TextBox?
------解决方案--------------------------------------------------------
<a href= "javascript:SetValue( ' <%#DataBinder.Eval(Conatiner.DataItem, "字段 ")%> ') "> //js在aspx中写function SetValue (value){ document.getElementById( " <%=this.TextBox1.ClientID%> ").value = value;}