C# - Enable Specific Page According To The User?
Apr 1, 2011
Using ASP.Net and C#
Webpage Menus are Admin, HR, IT
I am using Login Page in my Website.
Condition
If the website is login by Admin User, Admin Menu only enable
If the website is login by HR User, HR menu only enable
How to make a code for the above condition.
View 2 Replies
Similar Messages:
Jan 24, 2010
I have following grid view and in it item template button2 now i want to make it enable only for some specific value say for session or some userid.so that only specific user can del the record.
<Columns>
<asp:CommandField ShowSelectButton="True" ItemStyle-Width="5" />
<asp:TemplateField HeaderText="del" ItemStyle-Height="100" ItemStyle-Width="50">
<ItemTemplate>
[Code]....
View 6 Replies
May 7, 2015
I have LOGIN PANEL for student, and I want to disable it in different page. And only the admin can enable and disable it. I dont know the logic behind here.
View 1 Replies
Oct 7, 2010
I have a user control in my Master page and need to be able to Enable/Disable it from ANY page. How is this done? My user control has a few TextBox fields and a button. I was hoping to set a public property and simply Enable/Disable, but public properties seem to only work on the Master page code behind and not other pages.
View 4 Replies
Jan 25, 2011
In web application, after login "ReturnUrl" going to last visited page. How to set to go default.aspx.
I declared code in web.config like this.
<forms name="FormsAuth" loginUrl="Default.aspx" defaultUrl="Default.aspx"
path="/" timeout="200" slidingExpiration="true">
But If I close application at /Private/Admin/ReviewIssue.aspx page.
When I start again application in login page url has like this
[URL]
I want from login page to Default.aspx only.
View 1 Replies
May 28, 2010
how i can validate Specific user ON My Login Page
whether the username exist or not
if its exist it should match with the right password and right username
Language-ASP.NET C@
BACKEND-SQLSERVER 2005
View 6 Replies
Sep 4, 2010
I have a need to display user-specific information in my master page. As a result, I have set up all of my controllers to be inherited from a "master" controller. This has worked well for other aspects of the master page, such as displaying random quotes. However, while using this technique to incorporate the user-specific information, I ran into a problem where, when I check the Request.IsAuthenticated value, the Request object is null.
Here is my "master" controller:
[Code]....
Curiously - at least to me - is that the Request object becomes populated by the time program flow hits the Home Controller:
[Code]....
View 3 Replies
Jan 10, 2010
In classic ASP if you wanted to send a user to a specific page you would send/create a URL like :
posts.asp?id=24 ...the querystring indicating the post.
Well, in asp.net using a DetailsView control bound to a dataset, how do I do the same thing? In the address bar, all i see is posts.aspx when I'm paging through the records, no querystring part. How do I send a user to posts.aspx?id=24 when its a detailsview control on the page.
Note: I'm interested in sending a user to a specific postid not a specific index in the dataset.
View 1 Replies
Mar 14, 2010
I am trying to figure out how to associate a specific user to a specific data on the site, like social networking site.
View 3 Replies
Sep 12, 2010
I am using Formsauthentication. My situation is as per below:
the login form has codebehind :
protected void LoginButton_Click(object sender, EventArgs e)
{
TextBox uname = Login1.FindControl("UserName") as TextBox;
TextBox pass = Login1.FindControl("Password") as TextBox;
CheckBox rm = Login1.FindControl("RememberMe") as CheckBox;
Literal fail = Login1.FindControl("Literal1") as Literal;
if (Membership.ValidateUser(uname.Text, pass.Text))
[Code].....
Now the problem is that when I try to login with proper credentials it first redirects to default.aspx( there is no such page in my project), after login again with same credentials it properly redirects to the correct page. Why such problem arises? to fix this?
View 6 Replies
Apr 22, 2010
I'm not sure if this is possible or not, I'm using Roles to limit what pages a user can access based on there assigned Role. My question, is there anyway to redirect the user to a specific web page based on thier role after they login.
For example:
If Bob logs in with Role="Automotive", I want him to be redirected to Auto.aspx.If sue logs in with Role="Clothing", i want her to be redirected to cloths.aspx.
View 8 Replies
Jul 2, 2010
I want to enable or disable text box in specific row depending on value of field in data source
View 5 Replies
Jan 29, 2010
I am using forms authentication and authorization through roleManager. I have two Roles - "Customers" and "Employees". The redirection to the default page for the "Customers" role is working fine, but I get an oledb error stating that one or more parameters are not being passed when I redirect a user from the "Employees" role. The following is the code in login.aspx that handles the authentication of the user:
If myReader.Read() Then ' We have a match
If myReader(1) Then ' This is true if an Employee and false otherwise
If Not Roles.IsUserInRole(logInUser.UserName, "Employees") Then
Roles.AddUserToRole(logInUser.UserName, "Employees")
End If
ElseIf Not Roles.IsUserInRole(logInUser.UserName, "Customers") Then
Roles.AddUserToRole(logInUser.UserName, "Customers")
End If
FormsAuthentication.RedirectFromLoginPage(logInUser.UserName, logInUser.RememberMeSet)
Else
Response.Write("Invalid credentials")
End If............................................
View 1 Replies
Feb 24, 2011
I'm trying to allow logged user who are in department XYZ to perform some task for my third party App. I have two SQL tables named Users & UserList. The third party app (GoldMine) graps the USERNAME from the Users table and store it as UserID which I then referecnce SessionID. The UserList table has two columns (GM_UserName & Department) which I'm interested in. When a user login into the 3rd party app (GoldMine), i then compare the USERNAME (from Users table) to GM_UserName (from UserList table) and see whether GM_UserName is in = 'Dept XYZ'. Take a look at the SQL query below.
sqlDept = "SELECT USERNAME FROM Users LEFT JOIN UserList ON UserList.GM_UserName=Users.UserName WHERE UserList.Department ='Dept XYZ'"
I'm able to do this.
If Session("Userid") = "TestUser1" Or Session("UserID") = "TestUser2" Then Do this Else Do that End If
BUT unable to do this...
If user's Department = 'Department XYZ' Then
Do This
Else
Do that
End IF
View 2 Replies
Jun 6, 2013
I have table called ROLE with fields (id,name,permission) example values (1001,madhu,hr)
I have another table called LOGIN with fields(id,DOB,password) example values(1001,24101989,madhukumar)
What i want is , if i login using the LOGIN table ,it check the id and permission in the ROLE table , if the permission is 'hr' it enable to access the menu , or if the permission is any other it just print the error message ("no permission")
Note: menu is placed in master page , but login is not in the master page ...
View 1 Replies
Jan 28, 2010
I know how to enable/disable individual validator controls on the client side using
ValidatorEnable(validator, false);
But how do you enable/disable all the validators within a ValidationGroup?
View 2 Replies
Nov 23, 2010
I need to change culture of the specific aspx page bases on the main user's culture.I am able to fetch the data that which culture main user have.But some how I am not able to set the same culture for that aspx page.I had written the below code for that.
[Code]....
But that is not working it sets the default culture of the browser.
View 1 Replies
Jun 26, 2010
i am working in asp.net and csharp, we have 10 user, but certain user only need to put dataentry. how to enable and disable based on the user to access certain form ,like add, modify view options.
View 1 Replies
May 14, 2010
when i am trying to add a database to new website using "ADD NEW item--->SQL server databse i am getting an error which is telling
"Generating user instances in SQLSERVER is disabled.Use sp-configure user 'user instances enabled' to generate user instances."
how to enable the user instance option and where i can find it?
View 1 Replies
Jan 28, 2010
This below code I am calling from asp.net page. it is giving error when I am executing UserObj.SetInfo().
My environemnt: asp .net 2003
My Objective: to enable windows user ids threw asp.net application with admin rights
---------------------------------------------------------------
Error Message : General access denied error
--------------------------------------------------------------
web.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>[code]....
View 2 Replies
Mar 25, 2011
I'm staring to learn T4 .I want to create a framework for my self that enable me to generate DAL and UI.Like Code generator softwares that maps Codes and User Interface from database .i don't have any question about generating data access layer.my challenge is to generate UI ( asp.net controls and HTML)
View 1 Replies
Jun 2, 2010
I want to enable/disable controls of a asp.net page against a logged in user's permission. say 'admin' & 'hr' can change user's birth date text-box in a page but others will see the text-box as disabled.
so i wrote a function like this
[code]....
View 3 Replies
Aug 27, 2010
iam using masterpage and sitemap in my project, what i want to is that if user login is did, based on the user previlage in need to show the sitemap menu page if user i have the previlage to see the page then i should enable that page otherwise i need disable that page
View 1 Replies
May 24, 2013
I need a popup window to enable a user to edit rows of a gridview. This part is done and working. Now, i need to change this popup to contain a tab container instead so that more options can be added. This, however i have had no luck getting to work. Have tried finding an example detailing how this can be done, but no luck. I am using the ajaxtoolkit with SharePoint 2010 and asp.net 3.5
View 5 Replies
Mar 3, 2010
1) I know there are lots of web sites that describe in what order events are called during the Asp.Net page life-cycle. But is there also a tool, perhaps Reflector, that would enable me to figure out by myself in what order are ALL the page's events and their event handlers called during the page's life cycle? 2) Would you say that trying to figure out exactly what is going on under the hood is a good idea or a waste of time? To clarify - I'd like to figure out exactly what is going on when a control tree is build - thus all the method calls, all the events called etc needed for control tree to be build ( I imagine there are hundreds or perhaps thousands lines of code written just for building a control tree).
View 4 Replies