"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Friday, May 28, 2010

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."Solved"

 Hi, 
From last day this error is fucking my happiness.I search @ all forms 'n Blah Blah Blah i didn't get what i need.last i Solved it myself.
  In my early post i'm tell how to copy text from one text-box to another.it's done by one java-script.
when i put ajax over my pages this showing me this error
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

when i eliminate ajax it's working fine.but that's not a solution.On my search one told me that replace = with # i done it but i got another error on java-script.

 so i change the way i'm getting the value on the text-box 'n i done it

Previously it is in this way
           var paramVal1 = document.getElementById('<%=txtcheckin.ClientID%>').value;
Later i change to this
          var paramVal1 = document.getElementById('txtcheckin').value;


Have a nice day... 'N happy Coding :)
 Visual Studio 2010 Professional UpgradeProfessional Visual Studio 2010 (Wrox Programmer to Programmer)Microsoft Visual Studio 2010: A Beginner's Guide (A Beginners Guide)

No comments: