HOW TO FIND CONTROL INSIDE OF REPEATER

Total Post:48

Points:336
 5909  View(s)
Ratings:
Rate this:
Hello Everyone!
I have a repeater control on application where I have to use 3 buttons and these buttons should be displayed when any specific user logged on...user could be like Admin or Operator..
Please help with sample of code..

Thanks in advance!!!
  1. Post:127

    Points:915
    Re: How to find control inside of Repeater

    Try this code...might help you...

    if(Roles.IsUserInRole("operator"))
    {
    Button save=(Button)rptSample.Items[0].FindControl("btnSave");
    save.Visible = true;
    Button update= (Button)rptSample.Items[0].FindControl("btnUpdate");
    update.Visible = true; 
    }

      Modified On Mar-29-2018 03:41:25 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!