如何从css获取图像信息到MasterPage'gridview?

时间:2010-04-07 16:12:01

标签: asp.net css visual-studio-2008 master-pages

我尝试通过GridView.css将样式放入Masterpage我的母版页包含3页,3页源也有GridView。我添加了头标记css文件:

< link type =“text / css”href =“../ CSS / GridView.css”rel =“stylesheet”/>
还给我的GridVew源属性:

  <asp:GridView ID="gwRehber" runat="server" AutoGenerateColumns="false" CssClass="tablestyle" 
           onrowcommand="gwRehber_RowCommand">
            <AlternatingRowStyle CssClass="altrowstyle" />
                        <HeaderStyle CssClass="headerstyle" />
                        <RowStyle CssClass="rowstyle" />
       <Columns>
       <asp:TemplateField>
       <ItemTemplate>
        <asp:Button runat="server" ID="btnID" CommandName="select"  CommandArgument='<%# Eval("ID") %>'  Text="Seç" />
       </ItemTemplate>

       </asp:TemplateField>
          <asp:BoundField DataField="Ad" HeaderText="Ad"  Visible="true"  />
       <asp:BoundField DataField="BireyID" HeaderText="BireyID" Visible="false" />
       <asp:BoundField DataField="Degistiren" HeaderText="Değiştiren" Visible="false" />
        <asp:BoundField DataField="EklemeTarihi" HeaderText="EklemeTarihi" Visible="true" />
       <asp:BoundField DataField="DegistirmeTarihi" HeaderText="Değiştirme Tarihi"  Visible="true" />
       <asp:BoundField DataField="Ekleyen" HeaderText="Ekleyen" Visible="true" />
        <asp:BoundField DataField="ID" HeaderText="ID" Visible="false" />
       <asp:BoundField DataField="Imza" HeaderText="Imza" Visible="true" />
        <asp:BoundField DataField="KurumID" HeaderText="KurumID" Visible="false" />
       </Columns>
       </asp:GridView>/code>

alt text http://i39.tinypic.com/2m42j4o.png

1 个答案:

答案 0 :(得分:1)

图片的路径不正确。它们应该基于CSS文件的位置。将它们更改为../Img/sprite.png,它应该可以正常工作。