User Controls :: Disable Or Enable Menu Items Based On Login Type Of Logged In User

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


Similar Messages:

User Controls :: Enable Disable DropDownList Items Based On Database Values

Mar 20, 2014

May i know how to create the control function in asp.net  to control the values ?

Based on the DB table, it active is Y then enable values  in dropdownlist , if N then disable the values. 

View 1 Replies

How To Enable/disable Controls Against A User's Permission Via Type Casting

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

Security :: User Level Security - Enable And Disable Based On The User To Access Certain Form

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

AJAX :: Menu Control With Dynamic Url / Set The Menu Items As Enable/disable In Two Different Modes Say Edit/new?

Feb 22, 2010

I need a help in creating a vertical oriented Menu control with dynamic url's set in there Navigate Url property.Also i need to set the menu items as enable/disable in two different modes say edit/new.

View 1 Replies

Web Forms :: Change Menu Items According To The User Type?

Jan 20, 2011

i need to change menu bar links according to the users,how to made this possible using menubar control and sitemap path,as i dont have constant users...i dont know who is the top user and who is the low level user?

View 10 Replies

User Controls :: Show Hide Specific Section Of Page Based On User Type Or Role

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

Security :: Enable User To Edit / Delete Based On User's Role Permission

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

Web Forms :: Enable / Disable User Controls In Master Page

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

User Controls :: Display User Profile Image Of Logged In User?

May 7, 2015

I would like users to upload a profile picture when they register, and to then show that picture in a picture box control when they are logged in based  on that specific user.

View 1 Replies

Forms Data Controls :: Enable / Disable Controls In Template In Gridview When User Clicks Edit

Mar 4, 2011

I am looking to enable/disable controls (TextBox, DropDownList, etc.) in a GridViews template column based on the users specific access level when the user clicks the edit button. I have tried the following two methods:

[Code]....

View 4 Replies

MVC :: Strongly Typed User Control On All Pages Based On Login Status And User Role

May 9, 2010

I want to display a menu (which will be strongly typed with it's own unique model) across all pages only if a user is logged in.What menu items are available depend on the user's role and also I'll need to hit the repository to get numbers like "x Messages", etc

Been scratching my head for a simple solution here. Don't want to create something that need changes all over the place.All my controllers derive from a BaseController, all my Models from BaseViewModel....probably where I'll be implementing functionality for this.

View 3 Replies

Security :: Display Items Of The Logged In User ONLY?

Jun 8, 2010

am making a MyAccount page and want to display only the details of the logged in user and the previous Orders the logged in user made.

View 8 Replies

User/server Control With Custom List Items / Create A Simple Menu User Control

Feb 18, 2011

I'm attempting to create a simple menu user control just as outlined here.

The attached code results in an "Object reference not set to an instance of an object" error, but I can't figure out why.

<%@ Master Language="VB" CodeFile="MySite.master.vb" Inherits="MySite" %>
<%@ Register src="Controls/Menu.ascx" tagname="Menu" tagprefix="my" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">......

View 1 Replies

Web Forms :: Hide Some Menu Items For Non Logged In Users In Menu Control

Apr 8, 2013

What I want is to show menu items Administrator or show user menu items.Show menu items using login...How I can do it with role  provider, control menu and siteMap in masterpage?

View 1 Replies

Security :: Sitemap Control User Rights Enable And Disable?

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

Security :: How To Redirect Logged In User Based On Role

Nov 25, 2010

I want to know how can i redirect a user to a different page when he tries to access a page restricted to another role?

The scenario is as follows:

I have a folder "Gestao" that only allows users in role "Administrator"

[Code]....

If an anonymous user tries to access that folder he is redirected to the login page, but if a logged in user whose role is "friend" tries to access this folder he is also redirected to the login page. I want to redirect him to a page showing a message that he has no permission to access that page/area.

How can I do that? Should i have code on the Page_load event of the login page checking the user role and then redirect him to the correct page? Or is there some otherway to do this?

View 2 Replies

MVC :: Dynamically Render The Usercontrols Based On The Logged In User?

Dec 1, 2010

We have an application where the controls are dynamically added to the form based on the logged in user,

This user controls related data is stored in the database. There is lot of logic in the code behind in the asp.net webforms which is so messy to maintain it, we are planning to re-write it using the MVC framework.

I would say there would be rougly 50 different forms based on the user logged in, is it good idea to create so many views and redirect to the appropriate view based on the logged in user, in some of the forms there might be minor difference like the order of the Control might change.

View 3 Replies

Web Forms :: Streaming MP3s Based On Logged In User?

Apr 6, 2010

I have a requirement to be able to stream MP3s based on the user who is logged in. Eg, user 1 should only be able to listen to 1.mp3, user 2 should only be able to listen to 2.mp3 etc. All the mp3s would be stored in a particular directory on the server.

I am currently investigating the Silverlight audio player available at [URL]. However, I am unable to find a way to programmatically specify the file to stream once the user clicks the play button.

Are there any other media players/controls that allow streaming and also allow specifying the audio file to play programmatically?

View 2 Replies

Security :: Login A User From .NET Application And Keep It Logged In ASP?

Mar 11, 2010

We are developing for a customer a series of .NET intranet applications currentlydeveloped in ASP. However we would like to avoid the users the annoyance of having of login twice when they pass from one .NET application to an ASP one, Is there any way to export the session data from one application to the other?

View 1 Replies

Web Forms :: Disable User Login For 24 Hours After Three Failed Login Attempts

Aug 30, 2012

I have login page, users enter their username and password ... I want when users enter their password wrong after 3 time they can't enter password until 24 hours after that they can try it again, How i can do it?

View 1 Replies

Web Forms :: Filter Uploaded Files Based On Logged In User

Aug 30, 2012

I have a page that loads a two different files that the user uploaded during page_load. The code is an example I used from the aspsnippets site. The files are stored in a server folder while the location is saved in the database. The code below gets all files in the folder and binds them to a gridview.

Dim filePaths() As String = Directory.GetFiles(Server.MapPath("~/Uploads/2012/emp/"))
Dim files As List(Of ListItem) = New List(Of ListItem)
For Each filePath2 As String In filePaths
files.Add(New ListItem(Path.GetFileName(filePath), filePath))
Next
gvEmp.DataSource = files
gvEmp.DataBind()

What I want to do is to get only one file per user as the fileID along with the location is saved in for every user. I ran a query to get the fileLocation and pass that location stored in the database instead of the current server path but I can't figure out how I would do it.

View 1 Replies

Hide Registration And Login Form When User Is Logged In?

Jan 19, 2011

I am new at ASP.NET and I am having some difficulties. What I have below is a Registration and Login, both in one page. However, when a user is logged in, I would like the registration and login form to be hided. There is a LOGOUT option when the user is logged in.

[Code]....

View 2 Replies

C# - Programmatically Login To A Website And Redirect The User To The Logged In Page?

Mar 15, 2010

Right now, I have all the employees of my company login to an external website using the company id, username and a password. We are trying to integrate it into an intranet portal which should provide seamless access to this website without requiring the user to enter these credentials.

Is there any way of doing this programmatically (.NET C#)? Very similar to screenscraping, Can I simulate the appropriate POST action and then redirect the user to the logged in page?

View 3 Replies

Web Forms :: How To Get Logged In User Details When Using Membership Login Control

Jun 7, 2012

i have logged in using a login control

how can i transfer the login details to all other pages and how can i logout

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved