Four simple (I think) questions

C

Cal Who

The element shown below works OK. But if I add runat="Server" I get the
following compile error:

Too many characters in character literal
<iframe id="QQQQQ" name="QQQQQ" src="../Home/TestFile.htm"

onload="setWidthHeight('QQQQQ');" style="border: 2px solid aqua;"
scrolling="auto">

</iframe>

Got any idea what is wrong?



Second question:
When is it OK to use "this" in an aspx file to refer to the element it is
on?
As in: onload="setHeight(this);"
(I understand how to use such an argument in the JavaScript function)


Third question:.
Does onload refer to a code-behind method or a Javascript method. Or maybe I
should ask: When does...


Finally:
Sometimes I see both "name and "id" specified (as in the above)

I remember reading the doc and "name" had to be used if, for example, the
iFrame is a Target of a TreeNode. I do that and it works OK but I wonder
what is the rational for not using Id? When do I need to specify both?


I really appreciate the answer to one or more of the above!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top