locked
behavior of a detailsview RRS feed

  • Question

  • User-788967271 posted

    Hi all:

    I have a detailsview in this way

    <p><asp:DetailsView ID="dvdetalle_obras" DataSourceID="sqldsdetalle_obras" GridLines="None" Width="100%" BorderWidth="0" HeaderStyle-HorizontalAlign="Right" AutoGenerateRows="false" runat="server">
                        <Fields>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:Label Text='<%# Replace(Eval("descripcion"), "<br />", vbCrLf)%>' runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Fields>
                    </asp:DetailsView></p>

    When I look at the source code I have

    <table cellspacing="0" id="dvdetalle_obras" style="border-width:0px;width:100%;border-collapse:collapse;">
    			<tr align="right">
    				<td colspan="2"><a style="color:black" title="Versión para imprimir" href=# onclick=window.open("desglose_obras.aspx?id0=1&obra=1&idioma=1&id=ctl00_cphcontenido_gvobras_ctl03&imprimirdetalle=true&id0=1","ventana1","width=600,height=500,resizable=1,scrollbars=1")>Imprimir</a></td>
    			</tr><tr>
    				<td>&nbsp;</td><td>
                                    <span>zcv</span>
                                </td>
    			</tr>
    		</table>
    

    As u see I have 2 <td> per <tr>, I don't know why

    The first td is because i put in codebehind

            dvdetalle_obras.HeaderText = "<a style=""color:black"" title=""" & GetGlobalResourceObject("rgeneral", "versionimprimir") & """ href=# onclick=window.open(""desglose_obras.aspx?" & Request.QueryString.ToString & "&imprimirdetalle=true&id0=" & s.SelectedValue & """,""ventana1"",""width=600,height=500,resizable=1,scrollbars=1"")>" & GetGlobalResourceObject("rgeneral", "imprimir") & "</a>"
    



    Thanks in advance for any help

     

    Tuesday, April 16, 2013 8:47 AM

Answers

  • User-788967271 posted

    Hi all:

     I solve it. I put showheader=false in the templatefield

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 16, 2013 3:40 PM

All replies

  • User-788967271 posted

    Hi all:

     I solve it. I put showheader=false in the templatefield

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 16, 2013 3:40 PM
  • User1938476581 posted

    Hi,

    We are happy that your issue has been resolved. And thanks for sharing solution with us.

    Best Regards,

    Pengzhen

    Wednesday, April 17, 2013 3:43 AM