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

发布于 2024-08-27 20:21:02 字数 1834 浏览 2 评论 0 原文

我尝试通过 GridView.css 将样式赋予母版页,我的母版页包括 3 个页面,另外 3 个页面源也有 GridView。我添加了头标签 css 文件:


还给属性我的 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>

替代文字

i try to givee style via GridView.css into Masterpage my masterpage includes 3 pages also 3 pages sources has GridView. i added head tags css file:

<link type="text/css" href="../CSS/GridView.css" rel="stylesheet" />
also give property my GridVew source:

  <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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情话已封尘 2024-09-03 20:21:02

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

The path to your images is incorrect. They should be based on the location of the CSS file. Change them to ../Img/sprite.png and it should work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文