I was able to upload 4MB size audio file in my database. The problem occurred when I tried to upload 90MB .mp3 file to MS-SQL Server 2005. only 4MB is allowed by default. I increased the default size in the web config to 195MB,and it's still not working. The following code depicts the size that I currently set in the web config.
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 ...
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
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.
I'm using ASP.NET MVC 3.I would like to create an action filter to determine if a user can access a view. I have a User class with properties like IsAdministrator, IsTrusteeUser and IsAuditUser. How would I create an action filter to block certain users if the don't belong in some of these roles?And aslo how would I use this in my views to hide/display certain controls?
In an ASP.NET page I have added two user control with a dropdownlist each one. The selection of a dropdownlist should be changed the query to the second user control.What is the most efficient way to pass the selected value of dropdownlist to the second?I initially thought of creating a public event (public string OnClientSelectedIndexChanged) while the first user control and outsource through a public string SelectedValue the selected value of the second user control:
I am a Bigner in asp.net c# learning. How can i create a new folder in server from my c# program. in my semester asp.net project, i want to upload video/audio files into my own newly created folder and the storing folder's name must be given by me, which means each time folder name may change during uploading time. and how can i give a picture link to that vodeo files containing in different folders and how can i play that files in the browser using a player.
My page has a drop down whose values are dynamically populated. Based on which item is selected, a number of TextBoxes are dynamically created during runtime.The user then fills in information into the textboxes and clicks a submit button.
After postback from the submit button, I need to again dynamically create the TextBoxes during Page_Init (BEFORE LoadViewState) so that after the ViewState loads, my Button_Click event can save/do whatever with the user input. PROBLEM is, I cannot recreate the textboxes based on the selection in the dropdown, because the dropdown hasn't been "selected" yet by LoadViewState.
SO, how can I read from the view state, create my textboxes, then let the viewstate populate the textboxes, and then the Button_Click will use the values??
The one thing I've attempted is to override the LoadViewState function so that I can read from the view state, create the boxes, and then load the viewstate again. This did NOT work, because the debugger never seemed to hit my overridden function.
I am planning a project for a pharmacy to enter quality control data to generate reports and graphs with Crystal Reports. There are 20 stores, I need to password protect the entrance page, giving each store their own username and password (just one per store is fine), allowing the store to only access that store's data. Each store will have an associated ID in the MSSQL table.I am using the Membership Provider. I know I need to implement user roles for Managers and Stores levels (Managers can run reports for all stores), I wonder if I can set the default store ID for insert/edit templates after that specific store logs in.Basically, I think I need to filter SQL queries based on the store ID associated with a user ID. I have seen a .NET site that, after logging in, you type in a store id into a textbox, and it gives you access only to that stores data. Something like this would work for my situation.Can anyone explain or show me an example for the best method to accomplish this with C#?
I want to know that how to render partial view based on where the user navigates. I mean to say if user navigates to Home/index it will load different partial view and if user navigates to Home/contact it will load different partial view on the _layout page.
i want to show default image in gridview when user is not uploading the image.. i knw the concept but how to implemnt using code in vb.net. i know to store th eimag ein binary format and retrieve it but how to check it for null and display the deafault image if user not uploading the image.
my code is here: how to insert null value to image and display default image?
I have a form free user feilds, some drop down which are populated by a database data and a button. I want to create a new line in a table when the user clicks on the button. the values for this new line will come from the Values (not visible content) of the drop box, the content of the text feild, the user ID that I should get from the connection and the current date... ie, I want do do a INSERT INTO table (userid, dropdown, text, date) values (how do I get the user ID from the session?, how do I get the value from the drop down?, how do I get the text from the text box?, how do I get the current date?)
Im working with asp.net web application,I need to get multiple gridviews dynamically based on the count (which i get from database) for that i took a web user control and i added a gridview there . iwant to load that usercontrol in aspx.cs based on the count..
I am currently trying to implement a small class attendance system, where the student names are taken from a database, stored in a List<Student>, and bound to a Repeater control. Each row of the Repeater contains two columns: The first is the student's name, and the remaining column contains a RadioButtonList with three ListItems (Present, Absent, Sick).Now, once the user presses "Submit", I want to be able to store their attendance status based on the user selection. However, after submission, the SelectedIndex is always 0, no matter what option is selected.