Link Button in User Control causes JavaScript error

  • Thread starter Thread starter Fresh Air Rider
  • Start date Start date
F

Fresh Air Rider

Could anyone please explain why it causes a JavaScript error when I
simply add an <asp:LinkButton> to a User Control and then reference
and tag that user control within a webform ?

I am using Visual Studio .Net 2003 an C#

I have found postings from other programmers experiencing the same
problem but no-one has put forward a solution.

If it's a bug then Microsoft ought to make a patch available but I
can't find any reference to it on their website.

If anyone could offer any advice, I would be most grateful
 
Fresh said:
Could anyone please explain why it causes a JavaScript error when I
simply add an <asp:LinkButton> to a User Control and then reference
and tag that user control within a webform ?

I am using Visual Studio .Net 2003 an C#

I have found postings from other programmers experiencing the same
problem but no-one has put forward a solution.

If it's a bug then Microsoft ought to make a patch available but I
can't find any reference to it on their website.

If anyone could offer any advice, I would be most grateful

Once you drop the user control on a webform, the names of the controls
within the user control change. Look at the source of the generated HTML
that gets sent to the browser to see what I mean. Your javascript needs to
be aware of this change and behave accordingly.

Of course, you don't say what javascript error you are getting, so the above
is partly a guess of what I think you are running into. If not, you need to
post more details on what your javascript is doing and what error you are
getting.
--
Tom Porterfield
MS-MVP MCE
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
Back
Top