Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8067785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:26:32+00:00 2026-06-05T12:26:32+00:00

I have a shopping cart like application running on SharePoint 2007. I’m running a

  • 0

I have a shopping cart like application running on SharePoint 2007.

I’m running a very standard update procedure on a list item:

            using (SPWeb web = site.OpenWeb())
            {
                web.AllowUnsafeUpdates = true;
                SPList list = web.Lists["Quotes"];
                SPListItem item = list.GetItemById(_id);
                item["Title"] = _quotename;
                item["RecipientName"] = _quotename;
                item["RecipientEmail"] = recipientemail;
                item["IsActive"] = true;
                item.Update();
                site.Dispose();
            }

This item updates properly, however it briefly appears as modified by System Account. If I wait a second and refresh the page, it shows up again as modified by CurrentUser.

This is an issue because on Page_Load I am retrieving the item that is marked as Active AND is listed as Modified By the CurrentUser. This means as a user updates his list, when the PostBack finishes, it shows he has no active items.

Is it the web.AllowUnsafeUpdates? This is necessary because I was getting a security error before.

What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:26:33+00:00Added an answer on June 5, 2026 at 12:26 pm

    First off, it’s not AllowUnsafeUpdates. This simply allows modifying of items from your code.

    It’s a bit hard to tell what’s going on without understanding more of the flow of your application. I would suggest though that using Modified By to associate an item to a user may not be a great idea. This means, as you have discovered, that any modification by the system or even potentially an administrator will break that link.

    I would store the current user in a custom field. That should solve your problem and would be a safer design choice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a project (Web Application) in c# like shopping cart and i have
I'm writing a simple shopping cart application and have hit a road block. Currently
I have a shopping cart flow like this: Page 1 . Choose Products Page
I'd like to use Subsonic in a shopping cart application, but I'm trying to
I have a stored procedure which used for my shopping cart system which returns
I have a shopping cart and need to list the orders in a tabular
I have some animation I would like to try, kind of a shopping cart/checkout
I'm using the basic PayPal shopping cart (Website Payments Standard). I have the following
I have a shopping cart that continually logs slow queries like this one... #
I have a stripped down shopping cart application, currently with one model cart, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.