Names after compile in usercontrol

  • Thread starter Thread starter Blue Man
  • Start date Start date
B

Blue Man

Hello
I have a usercontrol which use a javascript on clientside, the name of a
TextArea is used for javascript.
the problem is the name of TextArea changes to "UserControlFile.ascx : Name"
after compile and javascript cant accept that name as an object's name.
how can i get rid of this ":" ?
 
Use the ID instead of the name. The ID is the same except the colons ( : )
are replaced with underscores ( _ ).

-Stanley
 
I'm no javascript guru but you should be able to use the ID to reference
items on your page. I do know that javascript does not like the colons in
the name and will not take it no matter what. And as far as I know there is
no way to alter what the Framework does for renaming it without re-writing
the Framework.

-Stanley


Blue Man said:
thats not possible. my javascript[HtmlTextArea] code uses Name only.

Stanley said:
Use the ID instead of the name. The ID is the same except the colons ( : )
are replaced with underscores ( _ ).

-Stanley
 
Back
Top