Reputation: 157
This is a very simple thing. I don't see my Ajax Rating Star in the grid view
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="PurchasedPID" DataField="PurchasedPID"/>
<asp:BoundField HeaderText="DatetimePurchased" DataField="datetime purchased"/>
<asp:BoundField HeaderText="MMBName" DataField="MMBName"/>
<asp:TemplateField HeaderText="Rating">
<ItemTemplate>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<cc1:Rating ID="Rating1" runat="server" CurrentRating="1" MaxRating="5"
StarCssClass="ratingStar"
WaitingStarCssClass="savedRatingStar"
FilledStarCssClass="filledRatingStar"
EmptyStarCssClass="emptyRatingStar" >
</cc1:Rating>
</ContentTemplate>
</asp:UpdatePanel>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
Site.css `
.ratingStar {
font-size: 0pt;
width: 13px;
height: 12px;
margin: 0px;
padding: 0px;
cursor: pointer;
display: block;
background-repeat: no-repeat;
}
.filledRatingStar {
background-image: url(Images/FilledStar.png);
}
.emptyRatingStar {
background-image: url(Images/EmptyStar.png);
}
.savedRatingStar {
background-image: url(Images/SavedStar.png);
}
`
Upvotes: 0
Views: 1223
Reputation: 6030
You need to reference the images in relation to the location of your stylesheet. If you have a folder in the root directory: Images/EmptyStar.png and your Css is in styles/site.css - then you'll need to reference it as:
.filledRatingStar {
background-image: url(../Images/FilledStar.png);
}
.emptyRatingStar {
background-image: url(../Images/EmptyStar.png);
}
.savedRatingStar {
background-image: url(../Images/SavedStar.png);
}
Upvotes: 2