本文整理汇总了VB.NET中System.Web.ApplicationServices.RoleService.SelectingProvider事件的典型用法代码示例。如果您正苦于以下问题:VB.NET RoleService.SelectingProvider事件的具体用法?VB.NET RoleService.SelectingProvider怎么用?VB.NET RoleService.SelectingProvider使用的例子?那么恭喜您, 这里精选的事件代码示例或许可以为您提供帮助。
在下文中一共展示了RoleService.SelectingProvider事件的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Application_Start
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
AddHandler System.Web.ApplicationServices.RoleService.SelectingProvider, _
AddressOf Me.RoleService_SelectingProvider
End Sub
Sub RoleService_SelectingProvider _
(ByVal sender As Object, _
ByVal e As System.Web.ApplicationServices.SelectingProviderEventArgs)
If (e.User.Identity.Name.IndexOf("@example.com") > 0) Then
e.ProviderName = "EmployeeRoleProvider"
Else
e.ProviderName = "CustomerRoleProvider"
End If
End Sub