VII-Twilight:Hi.
If you modify the Login control in the .vb of your Log in file, will you still be able to use roles to secure your site?
Because after I modified the Login control code in .vb file, roles do now seem to take effect
You mean don't?
If you are using the ASP.NET membership, you can validate the user account using the Membership API and still can use the roles defined on your RoleProvider
e.g.
On button click (say of your customized login control)
Dim username as string
Dim password as string
Dim isvalid as boolean
username = textbox1.text 'assuming username textbox has an id of textbox1
password = textbox2.text 'assuming password textbox has an id of textbox2
isvalid = membership.validateuser(username, password)
if isvalid = true then
formsauthentication.setauthcookie(username, true)
'do more logic
' to get the roles associated with the user, you can use the Roles.GetRolesForUser(username) and throw it to a string array
end if