views:

23

answers:

1

I have a page created from a master page. the master page has a form tag which contains the contents on the body tag and then i have a form on the page created from the master to handle uploading a file:

Master:

<form id="form1" runat="server">
page content here
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
    </asp:contentplaceholder>
</form>

Page:

<form id="form1" method="post" enctype="multipart/form-data">
<input type="file" id="File1" name="File1" runat="server" />
<input type="submit" id="Submit1" value="Upload" runat="server" />
    <br />
    <asp:Label ID="UploadErrorMessage" runat="server"></asp:Label>
    <br />
    <asp:Label ID="fileOne" runat="server"></asp:Label>
</form>

in my css file i've added rules to eliminate any borders:

form {
 margin: 0;
 margin-bottom: 0;
 margin-top: 0;
 padding: 0;
}

Heres a picture (please note that this black line goes away if i comment out the upload form) : http://img191.imageshack.us/img191/7503/blackline.jpg

A: 

Unfortunately the problem isn't evident from the code you posted above. I would really recommend using a tool such as FireBug which will allow you to quickly identify and isolate the html and css causing the black bar.

Once you install firebug, just hover over the black bar, right-click and select Inspect Element.

Form tags can also not be nested. You will need to remove the form tag on the child page for the form to function properly.

Chris Pebble
Tyvm Chris i will try what you have recommened
David
Hmmm This error disappears with Firefox :/
David
yep, error doesn't occur with opera/firefox/visual studios internal browser. Only IE has this problem
David