/// <summary> /// 系统角色数据绑定 /// </summary> public override void DataBind() { RoleDataList.DataSource = m_Role.GetRoles(); base.DataBind(); Literal lblRoleNo; Button btnDetail; foreach (RepeaterItem Item in RoleDataList.Items) { lblRoleNo = (Literal)Item.FindControl("lblRoleNo"); btnDetail = (Button)Item.FindControl("btnDetail"); btnDetail.Attributes.Add("onclick", String.Format("onSelected(1,\"{0}\");", lblRoleNo.Text)); } }
public HttpResponseMessage GetRoles() { var roles = rolesBusiness.GetRoles(); return(this.Request.CreateResponse(HttpStatusCode.OK, roles)); }