skip to Main Content

I have a problem when I tried to load the tag inside the ASP Repeater but it’s not showing inside the repeater. Here’s my code and I attached a picture showing the meter tag. Your help is highly appreciated.
enter image description here

 <asp:Repeater ID="Rink52" runat="server">
                                    <ItemTemplate>
                                        <a href="#" class="hotspot" id="picpoint<%# (Eval("Points") - 1).ToString %>" style="background-color: <%# Eval("Color_Condition") %>;"><%# Eval("Points")  %>
                                            <span>
                                            Point Area <%# Eval("Points")  %> (in Inches)
                                            <br />
                                            Minimum Value: <%# Eval("Min_Value") %>
                                            <br />
                                            Maximum Value: <%# Eval("Max_Value")%>
                                            <br />
                                            Average: <%# Eval("DropDown_Value")%> 
                                            <meter min="0" max="1.8" value=" <%# Eval("DropDown_Value")%>  "></meter>
                                           </span></a>

                                    </ItemTemplate>
                                </asp:Repeater>

2

Answers


  1. Chosen as BEST ANSWER

    I resolved the problem.

    <meter value='<%# Eval("DropDown_Value") %>' min="0" max="2" ></meter>
    

  2. Hum, that should work.

    However, "dropdown_value" does not look like a column name in the data source???

    Say I have this markup:

    <asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate>
            <div style="width: 20%; text-align: right">
                <h3>Hotel Name <%# Eval("HotelName") %>
                    <asp:Label ID="Label1" runat="server" Text="Rating"
                        Style="margin-left: 20px"></asp:Label>
                    <meter min="0" max="5"
                        value="<%#Eval("Rating") %>"></meter>
                </h3>
                <hr />
                <br />
            </div>
        </ItemTemplate>
    </asp:Repeater>
    

    code to load is this:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            LoadData
        End If
    End Sub
    
    Sub LoadData()
    
        Repeater1.DataSource =
            MyRst("SELECT * FROM tblHotelsA ORDER BY HotelName")
        Repeater1.DataBind()
    
    End Sub
    

    and result is this:

    enter image description here

    so, as a test, just put in a label , or something and "display"/"include" the value of in your markup – what does it spit out???

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search