Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html visual studio模块创建项目之间的无法解释的间隙dotnetnuke_Html_Asp.net_Module_Dotnetnuke - Fatal编程技术网

Html visual studio模块创建项目之间的无法解释的间隙dotnetnuke

Html visual studio模块创建项目之间的无法解释的间隙dotnetnuke,html,asp.net,module,dotnetnuke,Html,Asp.net,Module,Dotnetnuke,我创建了到sql server的linqdatasource连接,并将数据加载到listview中。 现在,对于该列表视图,我从该列表视图的顶部添加了另一个表,如标题 现在的问题是,当我将此模块添加到我的网站时,listview和顶部项目之间存在一个间隙,无论是表格、潜水还是其他内容 在VisualStudio内部,它显示良好,没有间隙。这是我的密码: <%@ Control Language="VB" ClassName="MyModules.ProductDetailsModule"

我创建了到sql server的linqdatasource连接,并将数据加载到listview中。 现在,对于该列表视图,我从该列表视图的顶部添加了另一个表,如标题

现在的问题是,当我将此模块添加到我的网站时,listview和顶部项目之间存在一个间隙,无论是表格、潜水还是其他内容

在VisualStudio内部,它显示良好,没有间隙。这是我的密码:

<%@ Control Language="VB" ClassName="MyModules.ProductDetailsModule" Inherits="DotNetNuke.Entities.Modules.PortalModuleBase" %>
<%@ Import Namespace="CodingStaff.Modules.MenuBox.Licensing" %>

<script runat="server">
    Dim prodID As Integer
</script>

<%
    prodID = Convert.ToInt32(Request.QueryString("ProductID"))
%>

<style type="text/css">
    h1 {
        font-family: Lucida Grande;
        font-size: 15px;
    }

    td {
        font-family: Lucida Grande;
        font-size: 13px;
        color: #999999;
    }
</style>

<table style="width: 704px;">
    <tr style="width: 704px;">
        <td>
            <table>
                <tbody>
                    <tr bgcolor="#e7e7e5" height="35">
                        <td align="left" style="width: 704px;">
                            <h1 style="color: #666666;">Technical info</h1>
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
    <tr>
        <td>
            <asp:ListView ID="ListView1" runat="server" DataKeyNames="PRODUCTID" DataSourceID="LinqDataSource1">
                <ItemTemplate>
                    <tr>
                        <td runat="server" style="width:352px"><strong>Product Code:</strong></td>
                        <td style="width:352px"><strong>
                            <asp:Label ID="PRODUCTIDLabel" runat="server" Text='<%# Eval("PRODUCTID") %>' /></strong>
                        </td>
                    </tr>
                    <tr>
                        <td runat="server" style="width:352px"><strong>Name:</strong></td>
                        <td style="width:352px"><strong>
                                <asp:Label ID="PRODUCTNAMELabel" runat="server" Text='<%# Eval("PRODUCTNAME") %>' /></strong>
                        </td>
                    </tr>
                    <tr>
                        <td runat="server" style="width:352px"><strong>Description:</strong></td>
                        <td style="width:352px"><strong>
                            <asp:Label ID="PRODUCTDESCRIPTIONLabel" runat="server" Text='<%# Eval("PRODUCTDESCRIPTION") %>' /></strong></td>
                    </tr>
                </ItemTemplate>
                <LayoutTemplate>
                    <table runat="server" border="0" style="">
                        <tr runat="server" id="itemPlaceholderContainer">
                            <td runat="server" id="itemPlaceholder"></td>
                        </tr>
                    </table>
                    <div style="">
                    </div>
                </LayoutTemplate>
            </asp:ListView>
        </td>
    </tr>
</table>

<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="ProductsModule.ProductsModuleDALDataContext" EntityTypeName="" TableName="PRODUCTs" Where="PRODUCTID==@prodID">
    <WhereParameters>
        <asp:QueryStringParameter Name="prodID" QueryStringField="ProductID" Type="Int32" />
    </WhereParameters>
</asp:LinqDataSource>
这里有一个类似的代码,有同样的问题:

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="View.ascx.vb" Inherits="DesktopModules_MyModules_ProductsModule_View" %>
<asp:LinqDataSource ID="LinqDataSourceProducts" runat="server" ContextTypeName="ProductsModule.ProductsModuleDALDataContext" EntityTypeName=""
     TableName="PRODUCTs" OrderBy="PRODUCTNAME" Select="new (PRODUCTID, PRODUCTNAME)">
</asp:LinqDataSource>

<style type="text/css">
    td   {
    font-family:Lucida Grande;
    color:#666666;
    font-size:15px;
    }
    table{
    margin-top: 10px;
    }
     A{
    text-decoration:none;
    }
    a:link{
    color:#666666;
    }
    a:visited{
    color:#666666;
    }
    a:hover{
    color:#666666;
    }
    a:focus{
    color:#666666;
    }
    a:active{
    color:#666666;
    }
</style>

    <asp:Table runat="server" style="width: 704px;" CellPadding="10" CellSpacing="0">
        <asp:TableRow bgcolor="#e7e7e5" height="45">
            <asp:TableCell align="left" style="width: 100%;" >
                <p1 style="color: #666666; font-size:inherit"><strong>Product list</strong></p1>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>

<asp:ListView ID="ListView1" runat="server" DataSourceID="LinqDataSourceProducts" GroupItemCount="4" DataKeyNames="PRODUCTID">
    <AlternatingItemTemplate>
        <td runat="server" style="background-color: #ffffff;color: #284775;"  width="176">
            <asp:Image  ImageUrl="~/images/drop59.png" ID="Image1" runat="server" />
            <a href="http://localhost/dnn7/Commercial-vehicle-lubricants/Product-line/product-details?ProductID=<%# Eval("PRODUCTID") %>" target="_self">
                <asp:Label ID="PRODUCTNAMELabel" runat="server" Text='<%# Eval("PRODUCTNAME") %>' /></a>
            <br />
        </td>
    </AlternatingItemTemplate>
    <EditItemTemplate>
        <td runat="server" style="background-color: #FFCC66;color: #000080;">PRODUCTID:
            <asp:Label ID="PRODUCTIDLabel1" runat="server" Text='<%# Eval("PRODUCTID") %>' />
            <br />
            PRODUCTNAME:
            <asp:TextBox ID="PRODUCTNAMETextBox" runat="server" Text='<%# Bind("PRODUCTNAME") %>' />
            <br />
        </td>
    </EditItemTemplate>
    <EmptyDataTemplate>
        <table runat="server" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
            <tr>
                <td>No data was returned.</td>
            </tr>
        </table>
    </EmptyDataTemplate>
    <EmptyItemTemplate>
<td runat="server" />
    </EmptyItemTemplate>
    <GroupTemplate>
        <tr id="itemPlaceholderContainer" runat="server">
            <td id="itemPlaceholder" runat="server"></td>
        </tr>
    </GroupTemplate>
    <InsertItemTemplate>
        <td runat="server" style="">PRODUCTID:
            <asp:TextBox ID="PRODUCTIDTextBox" runat="server" Text='<%# Bind("PRODUCTID") %>' />
            <br />PRODUCTNAME:
            <asp:TextBox ID="PRODUCTNAMETextBox" runat="server" Text='<%# Bind("PRODUCTNAME") %>' />
            <br />
        </td>
    </InsertItemTemplate>
    <ItemTemplate>
        <td runat="server" style="background-color: #ffffff;color: #333333;" width="176">
            <asp:Image ImageUrl="~/images/drop59.png" ID="Image1" runat="server" />
            <a href="http://localhost/dnn7/Commercial-vehicle-lubricants/Product-line/product-details?ProductID=<%# Eval("PRODUCTID")%>" target="_self">
                <asp:Label ID="PRODUCTNAMELabel" runat="server" Text='<%# Eval("PRODUCTNAME") %>' /></a>
            <br />
        </td>
    </ItemTemplate>
    <LayoutTemplate>
        <table runat="server">
            <tr runat="server">
                <td runat="server">
                    <table id="groupPlaceholderContainer" runat="server" border="0" style="background-color: #FFFFFF;border-collapse: collapse;font-family: Lucida Grande, Helvetica, sans-serif; font-size:15px; color:#999999;">
                        <tr id="groupPlaceholder" runat="server">
                        </tr>
                    </table>
                </td>
            </tr>
            <tr runat="server">
                <td runat="server" style="text-align: center;background-color: #FFCC66;font-family: Lucida Grande, Helvetica, sans-serif;color: #333333; font-size:15px;"></td>
            </tr>
        </table>
    </LayoutTemplate>
    <SelectedItemTemplate>
         <td runat="server" style="background-color: #FFCC66;font-weight: bold;color: #000080;">PRODUCTID:
            <asp:Label ID="PRODUCTIDLabel" runat="server" Text='<%# Eval("PRODUCTID") %>' />
            <br />PRODUCTNAME:
            <asp:Label ID="PRODUCTNAMELabel" runat="server" Text='<%# Eval("PRODUCTNAME") %>' />
            <br />
        </td>
    </SelectedItemTemplate>
</asp:ListView>
更新

我从chrome和f12的网站上查看了一下,看看差距会发生什么。我注意到在每个表声明上都添加了一个间隙。这是一个示例图像。橙色是产生的缺口,在技术信息下方,再次出现缺口


我发现了这个问题。我在另一个页面的另一个模块中有一个填充顶部30px。而且它似乎把这个选项分享给了整个网站。因此,在任何存在表声明的地方,它都会在顶部添加一个30px的间隙。我通过使用table.aVariableName创建特定的30px填充来修复它,这样就只限于特定的表

使用Firebug或Chrome开发工具检查该间隙时,您会看到什么?右键单击间隙,单击inspect元素?这应该会让你知道是什么造成了这种差距。明天我会在workIve上试一试,从chrome m8上看,我注意到每个声明上都有出于某种原因的唠叨。我上传了一个图片到线程。你知道这件事吗?