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 7817907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:23:46+00:00 2026-06-02T06:23:46+00:00

I am working in ASP.NET Dynamic Data web application and have an issue of

  • 0

I am working in ASP.NET Dynamic Data web application and have an issue of passing default value while inserting/updating records. In my application all table has following common column:

  • CreatedBy (Default Value : Logged in user)
  • CreatedDate (Default Value : DateTime.Now)
  • modifiedBy (Default Value : Logged in user)
  • ModifiedDate (Default Value : DateTime.Now)

I want to keep these column hide in Insert and Edit page and want that default value will be inserted automatically in the respective column.

Please suggest me.

Thanks
paul

  • 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-02T06:23:47+00:00Added an answer on June 2, 2026 at 6:23 am

    solution i have implemented finally:

    protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
       {
          e.Values.Add("CreatedBy", HttpContext.Current.User.Identity.Name);
          e.Values.Add("CreatedDate", DateTime.Now);
        }
    
     protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
        {
          e.OldValues.Add("ModifiedBy", null);
          e.OldValues.Add("ModifiedDate", null);
          e.NewValues.Add("ModifiedBy", HttpContext.Current.User.Identity.Name);
          e.NewValues.Add("ModifiedDate", DateTime.Now);
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a working ASP.NET MVC web application to manage projects and customers. Now
I am working on asp.net, C# web application. Working on my main page in
I am working on some ASP.NET web forms which involves some dynamic generation, and
I am building an ASP.NET application that needs dynamic tables. That's another issue that
At my work we have an existing ASP.NET web application and are duplicating some
I'm working on a web application (with ASP.NET 2.0 (C#) and jQuery) In my
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on
My Scenario, Im working asp.net vb application I have set of values to be
I have had a working asp.net 4 membership wesite for about 5 months and
While working in ASP.NET MVC, I often find myself defining a basic ViewModel which

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.