如何从css获取图像信息到MasterPage'gridview中?
我尝试通过 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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的图像路径不正确。它们应该基于 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.