My problem is simple, i have a datalist control with some controls inside of
EditTemplate (the problem is the same in the DataGrid). I want to have
access to this controls, using javascript, but
i can't. How can i do this?

<script language="javascript">
doent.getElementById('<%=txt1.ClientID %>').value='test';
doent.getElementById('<%=txt2.ClientID %>').value='test';

<asp:DataList id="Test" ...><EditItemTemplate>
<asp:textbox id="txt1" runat=server></asp:textbox></EditItemTemplate>

<asp:textbox id="txt2" runat=server></asp:textbox>

The first case, don't have success, but the second i can write to textbox.
The problem is that the client side ID of txt1 is "_ctl0:Test:_ctl0:txt1"
(different of txt2 ID ["_ctl0:txt2"]).

I have read this problem somewhere, but now i can't find it! :/
Can anyone help me?