VS 2008 - Showing Menus According To Assigned Rights Of User
Sep 2, 2011
I m developing a Web Based Inventory System Using ASP.NET which have a menu containing 16 options overall. I have created a menu using <ul> <li> tags. When I open my project in browser, it shows all the 16 options even i logged in with Administrator or Purchaser or Seller or Accountant etc.
I have a form to assign the Form Access Rights to every user. For example Administrator can use all the options but Seller can use only 3 options (Sales / Sales Return / Today's Sale Report). Purchaser can use 3 options (Purchase / Purchase Returns / Today's Purchase Report) Accountant can use 2 options (Payment / Receipts) etc.How can i show the menus to the users according to the rights assigned.
View 7 Replies
Similar Messages:
Jun 14, 2012
How to correct my code... because if condition is going to false condition every time when i check the session value with admin user and agent user..
Code:
<td bgcolor="#808000" style="height: 22px">
<% If Session("S_UserName").ToString = "Admin" Then%>
<ul class="solidblockmenu"> <li> <a href="Dashboard.aspx" >Dashboard</a> </li><li> <a href="MasterUpload.aspx" >Master Upload</a> </li><li> <a href="InboxAgent.aspx" >Agent Inbox</a> </li><li> <a
[Code] ....
View 1 Replies
Jul 7, 2010
I've got a site that users can use to check in and out documents. To check out a document, the user slects a file from a list, and clicks 'check out' . The document is taken from a 3rd party source control tool and placed in a dedicated directory on the server. Then, the file needs to be copied from this directory to a client directory the user has specified.
Copying to the Server is no problem.
I'm trying to use the WebClient objects DownloadFile method to write to the clients directory, but I keep getting "Access to the path '<path>' is denied.". I've set the UseDefaultCredentials flag to true, but no joy.
I'm obviously missing something, but I'm not sure what.
View 3 Replies
Mar 14, 2011
Roles: - administators
If it administator shows menu "Admin".
If I want to display the menu: "Create new employee ', have to create Roles: new_employee?
If so, how to choose a user and store specify their rights in c#?
View 3 Replies
Aug 31, 2010
I've got an ASP 4.0 website running on IIS 7.0 . Part of the web site creates an Excel document using C#, due to company policy I'm stuck with Excel 2003. I've noticed that when I deploy the site and use the part that creates the Excel file, its running Excel application object with the login of the user accessing the site. This causes problems with access rights to the Server.
How do I set the server up to run the Excel application using a fixed account? I've got the Application pool running under one, and I thought that would solve the problem, but it doesn't seem to.
View 1 Replies
Mar 18, 2010
Does anyone out there use ComponentOne's C1Menu and create a menu with subitems at runtime? I have went through their forums and help and anything at runtime is done with C1WebMenu which was replaced with this version.I need to create the whole menu with subitems. Can you show code for this if you have?
View 1 Replies
Feb 16, 2010
I need to programmatically create a database, some tables in it and then give db_datareader rights to a different user. The DB is mssql server 2005.
I got half way, I managed to create the database with "CREATE DATABASE Test", create some tables in it with CREATE TABLE. I'm doing this with a user that is in sysadmin role.
Now I'd need to do with code what manually (with Server Management Studio Express) I accomplish by: opening Security/Logins/[USERNAME] properties Map the user to the database (Test)Add check db_datareader
View 2 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
Jun 16, 2010
some samples for designing the menus and sub menus in html with styles and hover etc
View 8 Replies
Jul 9, 2010
I am a complete novice at this stuff, but i have been asked to investigate why the menus on our web site might not be working properly when vied in IE8 or Google Chrome. The site was built in Visual Web Developer 2008 Express edition, could this be the problem? If so is there a way around it without having to upgrade to VWD 2010?
View 2 Replies
Sep 24, 2010
in one of my page i need to display the menus & sub menus dynamically,for this i have a menu table called colleges & one more table called branchs 1] ABC
Science ArtsCommarce2] EFG mathszoology historylike thissome times the menus are 3some times they may be 4,5,6 may randommy incresesfor this i have the two table one is menu & sub-menus
View 2 Replies
Nov 27, 2010
In the database one number like a 91-9685748596 and, 2nd number like 9122-9685748596 and another one is 9685748596 .when we are try to formate it using substring function it all are may be9685748596,9685748596,9685748596.Mobile number is assigned as a primary key.so its showing error "Primary key violation".We can not the remove primary key also and there are 50 lack data in our database.
View 6 Replies
Jan 20, 2010
I want to create a menu in a application i am building. I have 3 user roles defined in the database with menu items, navigation url and menu nesting level. I want to generate a menu based on what user logs in. I have the fetch the data from table based on user role. I am having problem in designing and binding the menu(dynamic).
View 4 Replies
Jul 15, 2010
i currently develop an asp.net mvc 2 web app using asp.net membership and role management for authenticating and authorizing my users. I get complaints though that when adding a role to some user, he is not able to see new role assigned functionality, unless he re-enters (logout and login again) the application.
View 2 Replies
Feb 27, 2011
am new for learning asp.net using c
View 2 Replies
Dec 9, 2010
i have created loing form and create user form. then how to apply login rights..? i have 2 types of user. admin and normal user admin can move and use all pages while normal user can acces limited pages.
View 4 Replies
Apr 27, 2016
When a user wants to view another user profile on user profile page this error will show up
ERROR
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 72: protected void OnDataBound(object sender, EventArgs e)
Line 73: {
Line 74: string userName = (FormView1follow.Row.Cells[0].FindControl("hfUserName") as HiddenField).Value;
Line 75: string friendsUserName = (FormView1follow.Row.Cells[0].FindControl("hfFriendsUserName") as HiddenField).Value;
Line 76: string followStatus = (FormView1follow.Row.Cells[0].FindControl("hfFollowStatus") as HiddenField).Value;
HTML
<div class="text-center">
<asp:FormView ID="FormView1follow" runat="server" OnDataBound="OnDataBound" Width="100%">
<ItemTemplate>
<asp:HiddenField ID="hfUserName" runat="server" Value='<%# Eval("UserName") %>' />
<asp:HiddenField ID="hfFriendsUserName" runat="server" Value='<%# Eval("FriendUserName") %>' />
[Code] .....
View 1 Replies
May 7, 2015
URL.... Still there will be need of url in ajax method if i put javascript in site.master.cs . As what i have understood from that mysite.master.cs will be like this :
protected void Page_Load(object sender, EventArgs e) {
try {
if (Session["Prefix"].ToString().Trim() == "sys_admin") {
UserNameMasterLabel.Text = Session["UserName"].ToString().Trim() + " (ADMIN)";
[code]....
And site.master will be like this :
And I have to put next method in DailyLog.aspx page ? like this
System.Web.Services.WebMethod(EnableSession = true)]
public static int RefreshSession() {
HttpContext.Current.Session["Name"] = "BSD";
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/Web.Config");
SessionStateSection section = (SessionStateSection)config.GetSection("system.web/sessionState");
int timeout = (int)section.Timeout.TotalMinutes * 1000 * 60;
return timeout;
}
But I have several pages in my website , by doing the above story will it work for Builder.aspx ? or any other page rather than dailylog.aspx ?
View 1 Replies
Jun 28, 2011
In the IIS, it shows that the web app (i'm using) is using an application pool that uses NETWORK SERVICE account for identity. But when I debug/run my web app, User.Identity.Name shows that my windows user login instead. I checked my web.config file, and it does not have Impersonate enabled. In fact, I set it to false, and it still shows the same.
View 1 Replies
Jul 1, 2011
I am using vs 2008 in asp.net.. I have a field of [product_pic] which is 'varchar(50)' in my table.. my problem how can i show the image in datagridview? I can only the text which is the file name of the image..
View 2 Replies
Sep 13, 2010
I m using MultiView and View Controls in my site. I have placed some DropDownlists in different Views containing data of YES/NO or some other data. I have put that data manually by Edit Items. But when i run the project my all DropDownList shows empty.
View 3 Replies
Mar 21, 2011
I am using win 2008 Server with visual studio 2008 ,when i try to save my data through store procedure from my online application it is saving prefect arabic data in database but when i try to save data with inline query through my application is showing like question marks
View 5 Replies
Nov 18, 2011
I have a typed data set in the app_code folder. I created a new class (class1.cs) inside the app_code folder, and for some reason, when I type:
using SomeNameSpace1.someNameSpace1
it's as if the above namespace does not exist: "SomeNameSpace1" or "SomeNameSpace1.someNameSpace2" does not exist. If I create the class file outside of the app_code folder, then the namespace DOES exist. What am I missing?
By the way, the namespace i'm trying to use is the typed data set that was auto-generated.
View 2 Replies
Mar 4, 2011
I am creating a gallery of thumbnail pictures and when a user clicks one I need to show the full image. What I was going to do was on click set a varible for that picture and open ViewImage.aspx what would load that image big until I discover and ImageBox doesn't have a click event. Whats the best way of acheiving showing a large image simply from clicking a thumbnail?
View 1 Replies
Nov 24, 2010
why Visual Studio is not showing the last project open. Actually it's not showing any that I have had open. If there a clitch.
View 2 Replies