Black Line appears after adding second form to a VB .NET page?
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 eliminat开发者_如何学JAVAe 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
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.
精彩评论