Hi, I am creating a job site where there will be 3 categories of people accessing the site- Employer, Employee and Admin. Both Employer and Emmployee are
creating their login using my create user wizard and then they proceed to profile page.
But, now my problem is when a user logs in IF HE IS AN EMPLOYER he should be able
to see a link to search for emplyees and IF HE IS AN EMPLOYEE, he should be given a page with an option to search for jobs.
Now, how can I MAKE A CREATE USER WIZARD with a dropdown list to choose whether he is an employee or employer (his main role) at the time of createion of the
account in the Create User Wizard or if this is not a good option, can you suggest me another option to solve this issue?
Thanks
Loading
r pPosted Jun 25, 2008, 3:25 AM
I used a dropdown list in the register page and i gave the following code in the code behind page-
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
Roles.AddUserToRole(CreateUserWizard1.UserName, drprole.SelectedItem.Text);
}
It is working.
Thanks,
rp
ArshadPosted Jun 12, 2008, 3:03 PM
So now, while Creating new Account you can Add the Information About that person like he is admin or employee or else,
After that while Authentication in your Login Page, you can get the Information About that person, then you can Assign the Perticilar Page as per there Role,Means Admin will go to his page only and Employee will go to there own page, or else you waana show perticular thing related to them with in the page, then you can take there Role in the Session and go to the INLINE code and Add there <%If Session("Role")="1" %>
<%End IF%>
Then this button will show only for Role=1
This is Called the Simple Coding, or else you can do by Complex coding,that you can done in the Code behind file, Thanks
Regards
Khan