J
John Saunders
I've been working with a custom control, which I've _finally_ gotten to look
right both in the designer and at run-time. Except for one little thing.
The page containing the control has the following HTML:
<DIV style="WIDTH: 100%; BACKGROUND-COLOR: #999999">
.... control goes here ...
</DIV>
<div style="POSITION:relative;LEFT:100%;width:0px;height:0px;">
<div style="POSITION:relative;LEFT:-24px;">
<span onmouseover="...;return true;" onmouseout="...;return true;"
id="_ctl0_control"
style="border-color:#999999;border-width:4px;border-style:Groove;width:0px;"<img src="../../images/ChevronDown_999999.gif"
id="_ctl0_control_Image" />
<input name="_ctl0:control:Hidden" id="_ctl0_control_Hidden"
type="hidden" />
</span>
</div>
</div>
Now, at runtime, this positions the image in the upper-right corner of the
surrounding div. But at design-time, the image is positioned at the far
left.
I know that this is the generated HTML because I added a Debug.WriteLine
statement to my designer. In fact, this is the output from that (with some
indentation added).
Now, I've read that the designer host modifies our HTML in several ways, for
instance to display something which would otherwise be invisible. But does
anybody have any idea what might be going on here?
When I copy the generated HTML into the same page, it displays correctly in
the designer! So, what's the designer doing to my generated HTML?
Thanks for any help,
John Saunders
(e-mail address removed)
right both in the designer and at run-time. Except for one little thing.
The page containing the control has the following HTML:
<DIV style="WIDTH: 100%; BACKGROUND-COLOR: #999999">
.... control goes here ...
</DIV>
<div style="POSITION:relative;LEFT:100%;width:0px;height:0px;">
<div style="POSITION:relative;LEFT:-24px;">
<span onmouseover="...;return true;" onmouseout="...;return true;"
id="_ctl0_control"
style="border-color:#999999;border-width:4px;border-style:Groove;width:0px;"<img src="../../images/ChevronDown_999999.gif"
id="_ctl0_control_Image" />
<input name="_ctl0:control:Hidden" id="_ctl0_control_Hidden"
type="hidden" />
</span>
</div>
</div>
Now, at runtime, this positions the image in the upper-right corner of the
surrounding div. But at design-time, the image is positioned at the far
left.
I know that this is the generated HTML because I added a Debug.WriteLine
statement to my designer. In fact, this is the output from that (with some
indentation added).
Now, I've read that the designer host modifies our HTML in several ways, for
instance to display something which would otherwise be invisible. But does
anybody have any idea what might be going on here?
When I copy the generated HTML into the same page, it displays correctly in
the designer! So, what's the designer doing to my generated HTML?
Thanks for any help,
John Saunders
(e-mail address removed)