English 中文(简体)
ASP. 网上产出<br>标签?
原标题:ASP.NET outputting <br> tags?

由于某种原因,我每天在网上建造一个网站,并在每个周期之后进行产出分类。 产生分线中断的代码是

<asp:DataList ID="DL_Items" runat="server" DataKeyField="ProductID" oneditcommand="DL_Items_EditCommand" 
        oncancelcommand="DL_Items_CancelCommand" 
        onupdatecommand="DL_Items_UpdateCommand" 
        onitemcommand="DL_Items_ItemCommand" 
        onitemdatabound="DL_Items_ItemDataBound" 
    ondeletecommand="DL_Items_DeleteCommand" RepeatLayout="Flow">
<ItemTemplate>

我试图围绕眼光来寻找更好的解决办法,我可以找到一种办法,在我不希望的桌子上制定守则。 是否有理由使上述代码产生细线突破,<br>


Compete itemtemplate

<ItemTemplate>
    <div class="EC_Item_Left_Panel">
    <ul class="EC_Item_Left_UL">
    <li>
        <asp:Image ID="IM_PIC" runat="server" ImageUrl= <%# Eval("path") %>  /></li>
        <li>
            <asp:LinkButton ID="BT_Edit" CssClass="ecom_edit_tbn" CommandName="Edit" runat="server">Edit Item</asp:LinkButton></li>
               <li class="deleteRow">

 <asp:LinkButton ID="BT_Delete" ToolTip= <%# Eval("ProductName") %>  runat="server" CssClass="deleteButton ecom_remove_tbn" Text="Delete" ForeColor="Red"></asp:LinkButton> 
        <asp:Button ID="deleteCommand" runat="server" CausesValidation="false" CommandName="Delete" CssClass="deleteCommand" style="display:none" /> 
</li>

            <%--<asp:LinkButton CssClass="ecom_remove_tbn" ID="BT_Remove" CommandName="Delete" runat="server">Remove</asp:LinkButton>--%>
            <li><asp:LinkButton CssClass="ecom_link_tbn" ID="BT_Link" runat="server" CommandName="linkproduct">Linked Items</asp:LinkButton></li>
    </ul>    
    </div>
    <div>

     <div class="Item_Right_Panel">
    <ul class="EC_Item_Top_UL">
         <li><label>ProductID </label><span><%#Eval("ProductID")%></span></li>
     <li><label>Enabled </label><span><%#Eval("Enabled")%></span></li>
     <li><label>Title </label><asp:Label ID="LB_ProductTitle" runat="server" Text= <%#Eval("ProductName")%> ></asp:Label></li>
     <li><label>Product Code </label><span><%#Eval("ProductCode")%></span></li>
     <li><label>Category </label><span><%#Eval("Category")%></span></li>

     <%--Callum--%>
     <li><label>Price</label><span><%#Eval("Sale_Price")%></span></li>
     <li><label>Subcategory</label><span><%#Eval("Subcat")%></span></li>
     <li><label>Designer</label><span><%#Eval("DesignerName")%></span></li>
     <li><label>Range</label><span><%#Eval("Range")%></span></li>
     <li><label>Height</label></li>
     <li><label>Length</label></li>
     <li><label>Width</label></li>

     <li><label>Description </label><span><%#Eval("Description")%></span></li>
    </ul>

       <ul class="EC_Item_Bottom_UL">
    <li><label>KeyFieldName </label><span><%#Eval("KeyFieldName")%></span></li>
     <li><label>ItemField1Name </label><span><%#Eval("ItemField1Name")%></span></li>
     <li><label>ItemField2Name </label><span><%#Eval("ItemField2Name")%></span></li>
          <li><label>ItemField3Name </label><span><%#Eval("ItemField3Name")%></span></li>
          <li><label>ItemField3Name </label><span><%#Eval("ItemField3Name")%></span></li>
          <li><label>Include File </label><span>   <%# IncludeTitle(DataBinder.Eval(Container.DataItem, "include"))%>  </span></li>
    </ul>
    </div>

    </div>       
    </ItemTemplate>
最佳回答

The DataList creates the br s(See documentation of Flow layout at http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.repeatlayout%28v=VS.100%29.aspx).
If you don t want br s or any extra markup between elements, I d suggest you to use a Repeater instead.

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签