Hello All!
I am working on a project and I need the destinationurl of my login control to change depending on a value in a table.
I have it setup for binary configuration currently. Meaning that if a user has special rights to a page its 1 if not its 0.
What i am wanting to do is if the value in the table is 1 then go to AdminInventory.aspx and if it is 0 (or not 1) then go to UserInventory.aspx.
The table is UserInfo and the column is Admin.
My question is how can I do this? Do I do it on the login click of the Login Control or can I call an event under the "DestinationPageUrl"?
I know that code isn't programmatically right I just typed out what i thought I need to make the program do.
I am working on a project and I need the destinationurl of my login control to change depending on a value in a table.
I have it setup for binary configuration currently. Meaning that if a user has special rights to a page its 1 if not its 0.
What i am wanting to do is if the value in the table is 1 then go to AdminInventory.aspx and if it is 0 (or not 1) then go to UserInventory.aspx.
The table is UserInfo and the column is Admin.
My question is how can I do this? Do I do it on the login click of the Login Control or can I call an event under the "DestinationPageUrl"?
Code:
Protected Sub LoginButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
'If Username Admin status does not = 1 then
Login.DestinationPageUrl = "~/Users/UserInventory.aspx"
'ElseIf username admin status = 1 then
Login.DestinationPageUrl = "~/Admin/AdminInventory.aspx"
'End If
End Sub
I know that code isn't programmatically right I just typed out what i thought I need to make the program do.