I cant reach custom attribute from rate event

2 posts, 0 answers
  1. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 31 Jan 2014 Link to this post

    hi . i am using rating in listview. and i give to rating custom cId attribute. but i cant reach it now.
    rating
    <ItemTemplate>
                       <div class="rlvI">
    <telerik:RadRating ID="rCevap" runat="server"
                                       Orientation="Vertical"
                                       SelectionMode="Continuous"
                                       IsDirectionReversed="true"
                                       Precision="Exact"
                                       AutoPostBack="true"
                                       OnRate="rCevap_Rate"
                                       cId='<%# Eval("CId") %>'
                                       ViewStateMode="Disabled"
                                       EnableViewState="false"
                                       Visible='<%# Eval("CId")==null?false:true %>'
                                        >
                                   </telerik:RadRating>
                       </div>
                   </ItemTemplate>

    Eval("CId") is not null it has a value.

    rate event

    protected void rCevap_Rate(object sender, EventArgs e)
            {
               
                RadRating rc = (sender as RadRating);
              
                int cId = Convert.ToInt32(rc.Attributes["cId"]);
    ...
    }


    rc.Attributes["cId"] comes null every time.
    What is my mistake here.
    Thanks.
  2. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 31 Jan 2014 in reply to Cuneyt Link to this post

    ok my mistake viewstate.
    problem is solved with viewstate enable.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top