Rating control rendering a DIV tag

Last post 06-05-2008 11:57 PM by Jonathan Shen – MSFT. 1 replies.

Sort Posts:

  • Rating control rendering a DIV tag

    05-30-2008, 5:12 PM
    • Member
      13 point Member
    • mgp22
    • Member since 05-09-2008, 8:19 PM
    • Posts 40

     The AJAX Rating Control renders a DIV tag that adds a line break.  I don't want this line break!  Can anyone help??

  • Re: Rating control rendering a DIV tag

    06-05-2008, 11:57 PM
    Answer

    Hi Mgp22,

    One way is find the generated div and change its css by using Javascript.  For example, IE:  obj.style.styleFloat   Firefox:  obj.style.cssFloat.

    Another easier way is move your Rating control into a div and add css to the newly added div.  For example:

    <div style="float:left">
            <ajaxToolkit:Rating ID="Rating1" BehaviorID="RatingBehavior1" runat="server" CurrentRating="5"
                MaxRating="10"  StarCssClass="ratingStar" WaitingStarCssClass="savedRatingStar"
                FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar" Tag="99"
                OnChanged="Rating1_Changed" >
            </ajaxToolkit:Rating></div><div>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></div>

    Best regards,

    Jonathan

    Jonathan Shen
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (2 items)