.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Star rating in Datalist problem

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :ASP.Net

I have a user comments area that people can add their comments to the page.  I have successfully gotten the star rating to save into the database.  I now want to display the star rating into a datalist.

Here is what I have so far:

<asp:DataList ID="DataList1" runat="server" CellPadding="3"
                DataSourceID="dsHotelComments" Visible="False" BackColor="White"
        BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"
    GridLines="Horizontal" Width="843px">
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <AlternatingItemStyle BackColor="#F7F7F7" />
                <ItemStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                <SelectedItemStyle BackCo

View Complete Post

More Related Resource Links

datalist image slide show problem


hi friends

i am binding  images dynamically(back end)for a datalist .iam applying a slideshow for it .I am getting a problem to apply slideshow for dyanmically binded images.If the define in a div statically it working perfectly

for example pls go through my code below:

<script type="text/javascript">
$(document).ready(function() {
        fx: 'scrollLeft' // choose your transition type, ex: fade, scrollUp, shuffle, etc...

<div class="slideshow">
        <img src="images/30_dummy.jpg" width="200" height="200" />
        <img src="images/aquarius.gif" width="200" height="200" />
        <img src="images/star.gif" width="200" height="200" />
        <img src="images/the-proud-indian-flag-1.jpg" width="200" height="200" />

I above code works perfectly and the slide show e

Advanced Basics: Creating a Five-Star Rating Control


I have to admit it; most of my Windows® Forms controls are an attempt to copy something that already exists. In my October 2004 column I showed you how to create a progress bar that mimicked the one shown during the Windows XP setup routine, and this month I'm at it again.

Duncan Mackenzie

MSDN Magazine January 2005

AJAX rating control on DataRepeater problem



 I am using a DataRepeater control to display records from a database. I have placed an AJAX rating control in the repeater. The control works fine for the first record in the data repeater but it does not work for the rest of the records. The problem is that the control renders fine on the screen but I cannot click it - the mouse changes when hovering over it, but the control does nothing, not even when I click it. The first item works ok though. Any ideas what could be the problem?

 Thanks a lot

datalist printOut() function Problem

  • i m using below code..by using it i able to write asp data into word file n format it.but i m facing problen in print out..

    it show exception

    Message = "The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))"

    please hav a look at below code....

  •  .................div data...................   
  •   <div id="printdiv" runat="server">   
  •     <table style="border: 5px solid #FF00FF; width:100%">   
  •     <tr>   

  • DataList and DetailsView problem

    I have a problem hooking up the datalist to the details view. I know everything server side is fine cause the default values work, but I guess I am not getting post back from the datalist. Here is my code.<div id="thumbnail">                     <asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource2"                          RepeatDirection="Horizontal" DataKeyField="ItemsID">                         <ItemTemplate>                             <asp:ImageButton ID="Image1" runat="server" ImageUrl='<%# "Handler.ashx?ItemsID=" + Eval("ItemsID")%>'/>                             <asp:Button ID="button1" runat="server" Text='<%# Eval("ItemsID") %>' />                         </ItemTemplate>                     </asp:Dat

    Displaying the Rating (Star) Scale Control for a list item.

    Is there anyway to display the star rating control? I'm trying to build an application page that displays list items and their associated rating control. I can count the amount of ratings using the SocialRatingManager...?

    Problem with datalist paging


    I having a little problem to get the paging for my datalits to work. I have used this article: http://aspalliance.com/157 which i found do the things i wanted. I have implemented the code but no records show at all.. No errors.. Can anybody see what i have done wrong? Thank you!

    Here is my aspx code:

    <h2 align="center"><font face="verdana">Paging in DataList</font></h2>
    <a name="this"></a>
    <asp:DataList ID="dList" Runat="server" Width="100%"
    <table width="100%" style="font: 10pt verdana" cellpadding=0 cellspacing=0>
    <tr style="background-color:FF0000">
    <th align=left><font color="#FFFFFF">Store ID</font></th>
    <th align=left><font color="#FFFFFF">Order Number</font></th>
    <tr style="background-color:#f5f5dc">
    <td><%#DataBinder.Eval(Container.DataItem, "pName")%></td>

    problem with datalist in updatepanel


    Hi! i try to make a search part. there is a textbox which will be used for search context. also, i need to list category names. i don't use dropdownlist because its styles(for example border-style)doesn't change. So i tyr to do like this:i use a label and datalist. when clicking the label, datalist is showing. when i click the category name on datalist, it will be shown on label.(label is not in datalist.)my problem starts at that point. when i click category name on datalist , page is being postback. so i put datalist into updatepanel. but this time , i click category name on datlist,nothing occurs.(category name doesn't shown on label).my code is below:

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    Problem filling labels with table data outside datalist using single call to db


    On a single page, I'd like to fill 2 hyperlink controls as well as a datalist control with table data using one call to the database. The page looks like this:

    <div id="PageContent">    
          Please select the district you wish to view below.</p>
          <asp:DropDownList ID="ddlDistrict" runat="server" CssClass="textbox" 
            DataTextField="DistrictName" DataValueField="DistrictId" AutoPostBack="True" 
        <p><asp:label ID="lblDistrictAbbrev" runat="server" Text="District Abbreviation: " />
          <asp:hyperlink ID="hyperlinkDistrictName" runat="server" 
            Text='' NavigateUrl="~/Contact/NationalCouncil.aspx" 
            Font-Bold="True" />
        <p><asp:label ID="lblDistrictCouncillor" runat="server" Text="District Councillor: " />
          <asp:hyperlink ID="hyperlinkCouncillor" runat="server" 
            Text='' NavigateUrl="~/Contact/NationalCouncil.a

    Problem to group radio button across gridview rows

    In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

    Regrading Sharpoint 2010 problem and solutions

    We can write your question and problem on this blogger.you get ans.use.

    This sharpoint 2010 problem solving threads

    Hi friend,

    you can use this thread to solving problem and solutions.

    Virtual Path Problem


     I get the following error on last line below (working on remote host): 'E:\web\sfcascom\ls_admin/uploads/images/001.JPG' is not a valid virtual path,

    Note that the slashes go in different directions

    I've tried a number of things but nothing seems to work. Thanks-


    Imports System.Drawing
    Imports System.Drawing.Drawing2D
    Imports System.Drawing.Imaging
    Imports System.Web.UI.WebControls
    Imports System.Drawing.Imaging.ImageCodecInfo
    Partial Class Protected_imageupload
        Inherits System.Web.UI.Page
        Private Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
            ' Initialize variables
            Dim sSavePath As String
            Dim sThumbExtension As String
            Dim intThumbWidth As Integer
            Dim intThumbHeight As Integer
            Dim sFilename As String = ""
            ' Set constant values
            'sSavePath = "images/"
            sSavePath = Server.MapPath("~/") + "ls_admin/uploads/images/"
            sThumbExtension = "_thumb"
            intThumbWidth = 160
            intThumbHeight = 120
            ' If file field isn?t empty
            If FilUpload.PostedFile IsNot Nothing Then
                ' Check file size (mustn?t be 0)
                Dim myFile As Http

    Strange Photo upload problem


    I'm working project it's live on shared hosting

    we'er uploading photos to a file on the server everything works fine the photo is resized renamed and sent to the folder

    the upload page returns the thumbnail and the full size photo it's there all the photos have to be approved by an admin

    twice now after they have been approved they disapear I checked the folder they are not there could there be anywhere

    on the server they could get hung up before they go into the folder I have it setup so when you delete the data base entry it deletes the photo from the folder othe than that you need to open the folder and delete the photo this has hapened twice now I tried to recreate it with no luck

    thaks for your help in advance

    ASP.Net Caching problem ??


    I'm having a problem with an asp.net 3.0 application using a gridview to display data.  The problem seems to be that despite a brand new .selectCommand being sent to the sqlDataSource, the gridview starts displaying data from *someone else's* query.  For example, user A is logged in and will be working fine until a few page submissions later when the gridview data starts suddenly showing information that belongs to another user. 

    This is my first asp.net application, though I've been working with classic asp and ADO for years so I'm used to sending a SQL string and getting back the results from that string.  Apparently there is a complex caching system which is interferring which I do not at all understand so at this point I just want to stop the server from caching any data whatsoever.  Is this possible?

    Any and all help will be much appreciated!!

    Could some one tell me whats the Problem with this String Manipulation ??? C#.net



    I store some values from code behind to a label which is Hidden !

    <asp:Label ID="lbl_Hidden" runat="server" Visible = "false"></asp:Label>

    and at the page load event i retrieve the value of the label & assign it to a string !

    stringvalue = lbl_Hidden.Text;

    Now i dont know why this manipulation does'nt work !

    I've a character 'A' in the string and i'm unable to replace it with a space !

    stringvalue.Replace(A, " ");

    Wot do u think abt it ????

    RaiseEvent problem


    I have a parent page ProdView.aspx and two static UserControls, UC1 and UC2. Each UC is in an Ajax accordion pane and the accordion inside an updatepanel.

    UC1 has a Gridview footer with couple of textboxes and a link button that fires an Add Row insert procedure. I want to Raise an event that will rebind the UC2 after the row insert in UC1.

    First I created the sub delegate and event in UC1:

    • Public Delegate Sub MyRefresh(ByVal sender As Object, ByVal e As CommandEventArgs)
    • Public Event Refresh_UC1 As MyRefresh

    In the same UC1 the Insert procedure that fires the insert and RaiseEvent:

    Sub PricingGrid_Insert(ByVal sender As System.Object, ByVal e As EventArgs)
           Dim myConn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("LocalSqlServer").ConnectionString)
           Dim myCom As SqlCommand = New SqlCommand("AddRow", myConn)
           myCom.CommandText = "AddRow"
           myCom.CommandType = CommandType.StoredProcedure


    ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
    Sql Server  SharePoint  Silverlight  Others  All   

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend