Havent' done ASP.Net for a while but could you try do it later than you are -
pre_render or something.
On 5 Jan 2012, at 01:05, Greg Keogh wrote:
> I just noticed that the IDs don’t match. In the rendered page I see this:
>
> function NoteCheck()
> {
> var text =
> document.getElementById('ctl00_ContentPlaceHolder1_UMAuthRepeater_ctl01_converseCtl_conitemCtl_textNote');
> var btn =
> document.getElementById('ctl00_ContentPlaceHolder1_UMAuthRepeater_ctl01_converseCtl_conitemCtl_btnConSave');
> var len = text.value.length;
> btn.disabled = (len == 0);
> }
>
> <td><input ...
> id="ctl00_ContentPlaceHolder1_UMAuthRepeater_ctl02_converseCtl_conitemCtl_textNote"
> onFocus="NoteCheck();" onKeyUp="NoteCheck();"
> style="height:60px;width:300px;" /></td>
>
> So my JavaScript logic is probably still correct, but the IDs don’t match. I
> also tried <%=textNote.ClientID%> style syntax instead of string.Format, but
> it makes no difference. I’ve not seen this mismatching ID problem before, but
> at least I now know why it’s crashing, but don’t know the underlying cause or
> cure.
>
> Greg