need to change class in repeater elements

i have a repeater:
  • <%#Eval("iconURL")%>
and i want to handle all the buttons in the same function: protected void sideMenuSports1_Click(object sender, EventArgs e) { changeDataSources(); /*-----> this function supose to derict to URL(in a div on the same page) acording the id of the item of the repeater */ removeAllClasses(); /*this supose to remove all class named selected from the element in the element */ ((LinkButton)sender).Attributes.Add("class", "selected"); } to sumerise, what i need is: 1. i need to remove the class "selected" in all the repeater `` elements, then add it only to the element the user clicked 2. each button clicked redirect to other URL ,how i pass the button the id of the repeater element?

以上就是need to change class in repeater elements的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » HTML5 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准