.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to allow anyone to see the data, but only logged in users to edit it?

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :ASP.Net
Hello,Don't know if this is documented anywhere, but I haven't found it yet.Let's say I want to allow anyone visiting a site to see the data. That's fairly easy as DD does this for you.However, I don't want just anyone to be able to edit the data. I only want selected people to be able to do that. I presume DD works with forms authentication as I've seen it mentioned, but I ahven't seen how to do it yet. Anyone able to give some pointers?Assuming that I've got authentication, how do I make it so that the public doesn't see an edit or delete link when viewing data?Thanks for any help

View Complete Post

More Related Resource Links

logged in user data


I'm using the defualt membership provider, i created a table and used the gridview on the logged in user page to show his information such as address e-mail phone zip code etc,, how can i do this without writing a code?

I am new to asp.net  i need simple help please?

Users getting logged out because HttpContext.Current is null


We've  been trying to fix this one for a couple years, and I'm just out of ideas, so any help is really appreciated!

We've got a fairly large, complex web application that uses Forms Authentication to authenticate users.  Throughout the application we store and retrieve information about users in the Session object, and in some cases in cookies.  In a couple places we check for the existence of the context, and if it's null we send the user back to the login page to re-establish the session. 

Just a quick run-down of this web app: C#, .NET 3.5, IIS 6, ASP.NET State Service to manage session

As for the session timer, we use our own home-grown timer, which is basically a client-side timer, which is backed up by a check to the SQL database to see when their last activity was.  This seems to work well for us.  It's not perfect, but it allows us to notify the user before the session times out, and allows us to be certain we're not logging a user out before their 60 minutes of inactivity is up.

What's happening is that certain users are being logged out after just a few minutes.  We've eliminated the timer as a cause and believe what's happening is the HttpContext.Current is null, so the user is logged out.  We do not know why the HttpContext.Current is null, and I underst

Code to get how many users are logged in to the sharepoint site

How to get the users of my sharepoint who are online.....

Thanx in advance,


review, edit and insert data using 2 diffrent database



is it possible to create a custom list in sharepoint designer to enter a vacation request and using a work flow that goes to the HR department. but when the HR department approve the request the HR can store these requested data into another database?

what i mean is, the employee fill a form in to request some vacation days using a custom list in my wss3 site. i assume that these data will be stored in the WSS_content database. now when the HR department get this filled form they have to store the data of the form in to a database but not in the WSS_Content database.

is this possible?

Getting Users who logged on in last month

Hi all, Using Sql Server 2005. Is it possible to retrieve from Sql Server the name and times of all users who logged into the server in the last month? Regards Melt

"Only their own" allows users to edit, then shows access denied page

I am managing a WSS 3.0 portal.  I have created custom lists where a group has contribute permissions.  Under List Settings|Advanced Settings, when I set Edit Access to "Only their own" or "None", my test users can see the Edit Icon and the Edit Item menu option, and bring up the Edit Form.  When they click "OK", they get the Access Denied page.  My experience in that past is that they should not even been shown the option to edit, and they should get Access Denied if they somehow navigate to the EditForm.aspx page.  I even tested this on a brand new site, with three Links lists, each with different Edit Access Levels (All, None, Only their own).  I added one user with contribute permissions.  He had the same result: He could get all the way to EditForm.aspx, but got "Access Denied" when he submitted his changes.  What can I do to fix this?Christopher W. Douglas

limitate user permission to edit other users documents

i have a list where everybody uploads documents, but i want that only the user that uploaded the document can edit it or delete it, is there a simple way without workflows or code? thanks!

FBA users (ldap provider) don't have any user profile info when logged in.... what am I doing wrong

Sharepoint 2010, Claims authentication, FBA using ldap membership provider and role provider against Active Directory.  User profiles all imported just fine -- used the LDAP FBA provider hitting Active Directory to do so too.  whenever an FBA user logs in, it doesn't seem like sharepoint is picking up any user attributes.  targeted audiences don't work and MY SETTINGS is blank other than account and name.  If the same user logs in but through Active Directory, everything works just fine... targeted audiences, etc. Am I doing something wrong or can I not use the LDAP provider to authenticate to AD and also use the user profiles from Sharepoint?  GRRRRR.  All this to get around the Windows Authentication popup so I can customize a better looking logon experience.  Help?

Allowing Certain Users to Edit Certain Rows in a GridView

Here's my problem:    Different agencies are submitting projects to us, but I only want them to be able to edit their specific project (in addition, when they submit a project, they can only submit on behalf of their agency - but that may be a separate issue). Anyway, I can use the codebehind to show/hide the edit/delete/details buttons based on whether or not the user is authenticated using the following simple code in the Page_Init event:   If User.Identity.IsAuthenticated Then GridView1.Columns(0).Visible = True Else GridView1.Columns(0).Visible = False End If   To get what I want, though, I need to check each row (RowDataBound Event?).  The "SponsoringAgency" field will need to be validated against the user's credentials, and then the Edit button will be visible/invisible based on the result. Here's what I don't know how to do: 1.  When the user registers, have an additional field that asks and stores their agency information. 2.  I can't quite figure out how to get the SponsoringAgency value from the gridview.  I've tried a few tests using:   If e.Row.Cells(11).Text = "AgencyA" Then e.Row.Cells(11).Text = "TEST" End If   This does not work - the text isn't changed.  One of the possible problems is that I'm not sure I'm getting the right column in my grid

Unable to Show Edit item Links in Data Form Web Part

I have a DFWP connected to custom list and the boxes to Show Edit Item Links, Show Delete item links and Show Insert Item links are grayed out so that they can not be checked. This works fine when I use a DFWP connected to a standard list (i.e., Contacts). Is there something special that needs to be done to activate this functionality?ThanksDean

make anonymous users submit data to a form library

isn't there a way for anonymous users to submit form data to a form library without custom code?

Full Control users only able to edit Shared Version of page in MOSS 2007

Hi, In MOSS 2007 we have a site collection that does not allow the owners to edit pages. There is no broken inheritance in the permissions, and when a user clicks "Site Actions" and then "Edit" they get a toolbar saying they are only editing the Shared Version of the page. No pages are checked out to any other users either and the users attempting this (including the Farm account) are not able to edit these pages. What would be the next steps to debugging this problem as it is not one I have encountered previously?  

How to properly configure permissions so users can view, add, edit, and delete list items, but not w

I am trying to figure out how to properly setup security so that it can be configured at the top-level, and then inherited all the way through. Here is what I would like to do: Each user can view, add, edit, and delete list items - but, users cannot modify or delete web part pages. The only way I know how to do this is set Contribute from the top-down, and then go into each Site Pages library and set Read access. The problem is that I have 100 sites, and I was hoping there was a way I could set security at the top, and inherit downward. Rather than having to go into all 100 Site Pages library and set Read access. Is there a way to do this? Thanks in advance.

Need advice to display data in DataGridView, then edit dan save the data

I am Winform Beginner. To display data using DataGridView is ok with me. How the best way to select row in DataGridView, then edit and save. Did this DataGridView can editable? or Once row in DataGridView is selected, then popup another form to perform edit transaction. Really need advice and good example

Edit users roles in gridview

I am trying to implement a page for an admin to edit other users details including roles and profile. I have a custom profile provider that stores data in database. My implementation is a page that shows username and allows an admin to reset user password, unlock users and approve and disapprove the users. I wanted to add a column in the gridview to allow the admin to remove or add a user to a role with the constraint that a user should be added only to one role.Any idea please?

Accessing Logged In Users Details from MasterPage

Hi I have designed a navigation structure that is customisable from within my application and linked to the users role. So I can restrict what menu items a user gets based on their role. I have managed to do this quite well using SQL Tables and an ASP.Net Menu. I can get it to only show the menuitems that are marked active and I have created an Stored procedure to get the menu items for a particular role. Where I am struggling is getting the Logged On Users Roleid to pass it to the Stored Procedure. I can get it using a regular aspx page but my menu is on my masterpage and I do not want to have to code it in each and every page. I even tried to do it with a user-control but same happens.  It seems that the User class is just not available when in a masterpage. Anyone know how I can pass the roleid from a Class or something or from the page to the masterpage? Please Help.   Ronnie 

Auto-fill Title and other fields from a data View edit menu

How do I Auto-fill Title and other fields in a list from a data View edit menu. The Title and other current data should transfer from the data view row being edit. Can anyone point me into the right direction how to accomplish this? Thanks. Mike  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend