You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Chapter 16:Page 615 try it out Checking Roles with IsUserInRole at Runtime
Step 8. The Delete Button does not show. Please advise Larry
code
Protected Sub ListView1_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ListViewItemEventArgs) Handles ListView1.ItemCreated
Select Case e.Item.ItemType
Case ListViewItemType.DataItem
Dim deleteButton As Button = CType(e.Item.FindControl("DeleteButton"), Button)
deleteButton.Visible = Roles.IsUserInRole("Managers")
End Select
End Sub
[/code
User: Manger
I checked the Web Admin:
User
User ID:
E-mail address Active user
Description:
Chapter 16:Page 615 try it out Checking Roles with IsUserInRole at Runtime
In chapter 17 Pg 644 while after adding a new album and clicking on clicking on Edit Photo album the delete button appears. I was signed as manager. Larry