How to get image info from css into MasterPage'gridview?


Tags: asp.net,css,visual-studio-2008,master-pages

Problem :

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



Solution :

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.


    CSS Howto..

    How can I set inline css styles for an element with javascript?

    how to have custom css overrule bootstrap

    Is there a plugin for Wordpress that lets me show HTML/JS/CSS examples? [closed]

    How do I change the image inside an HTML5 form-validation message?

    How to style 2 vertical jQuery UI Slider handles?

    How to set the path to compile my CSS with Compass SASS

    How to align text and image in a CSS box?

    How do I overlap PNG images for a “build your own t-shirt” product display page - javascript/css/asp

    How to make custom login button work

    How to set background color in border in CSS

    How can I convert this from jQuery to vanilla JS?

    How is Facebook's website front-end and it's right sidebar designed?

    How to use conditional CSS In CakePHP 2.x?

    How to do fade-in and fade-out with JavaScript and CSS

    How Do I Set the condition for a user to have to fill in a Textfield

    How to find class =“class1” included class=“class2” in CSS? [closed]

    Why my tabs (i.e HOME, ABOUT ME..) doesn't show the corresponding paragraph or section?

    How can I load css file in Meteor for just one page?

    how to creating a separator line which is always in the middle (center)

    How to make float navbars with JS and CSS?

    CSS: how to put one image and one block with two

    in one line not using float

    How not to override property in CSS

    How should I create a web interface for my application? [closed]

    how to put image on button? (css)

    How to displaying and hiding again the div after clicking a button

    How to align social like buttons next to copyright text inside footer?

    How not to mess up styling when using css frameworks

    How to minified all js and css files using gruntfile.js in sails.js

    How to avoid messing formating up?

    How to retrieve the real height of a #div (including overflowed parts)