try
btnClose.Attributes.Add("onClick", "window.close();")
you need to keep in mind that sometimes asp.net will tack on additional
items to the onclick that you're not aware of....
thus you need to cleanly close your javascript commands.
if you get desperate.. add
<script language='javascript'>
and
</script>
before the window.close..but I don't think that is the issue.. I think its
the lack of a trailing ; on the end of your line
"david" <da***@discussions.microsoft.com> wrote in message
news:0F**********************************@microsof t.com...
My web form worked fine before. Today I found three buttons do not work,
including a close button with ID btnClose. I use
btnClose.Attributes.Add("onClick", "window.close()")
in codebehind in VB.
The IE error message on the bottom after page loading:
line: 165
Char:44
Error: unexpected ';'
code:0
I have check line 165 in HTML and VB. I can not find anything. VB is
compiled now. I do not know where the problem is.
David