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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:19:54+00:00 2026-06-07T22:19:54+00:00

I am researching about the right approach on how to implement data entry forms

  • 0

I am researching about the right approach on how to implement data entry forms that change according to the data entry mode. Here’s the situation:

  1. Consider a parent-child form where you have a list of employees and a section to display employee details.

  2. Clicking on an employee number from the list will cause the employee details to appear on the right-hand side of the screen using an HTML table.

  3. The employee details will first appear as a read-only form. For example, the Country of Birth field would be displayed as ‘SPAN’ rather than a SELECT element.

  4. When the user clicks the Edit button than the Country of Birth field is changed to a SELECT element containing a list of countries to choose from.

It is the behaviour of the ASP.NET FormView with ItemTemplate, EditItemTemplate and InsertItemTemplate that I would like to implement using jQuery.

In essence the data entry mode would be toggled by clicking buttons. I thought I would approach this requirement by using CSS rules for fields which would contain different DOM elements according to the data entry mode. As I mentioned earlier, if the mode is read-only show a SPAN otherwise show a dropdown element or textarea. Using jQuery I could toggle() between the different classes according to the data entry mode. Of course this would require two different types of elements for the same field.

Is this the best approach? I’m keen to hear from the experts. Thank you.

  • 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-07T22:19:55+00:00Added an answer on June 7, 2026 at 10:19 pm

    You have two choices.

    1. Use standard asp.net forms. This has been well documented and typically does not include two controls as you describe. Instead of a read-only control and an edit control, the server side will render the page using the same user control or server control but in an edit mode instead of read only. This way is often used when there are security requirements or for some other reason you don’t want the client deciding which items are editable. (NB some people will get grumpy and talk about how you can do security with AJAX, but this is still true. If you want security and server side validation or processing this is easier).

    2. Use jQuery / AJAX (and/or MVC). In this model the client decides everything about how the interface works and then sends information to a web service. In this case you might (as you describe) have two controls which you show and hide. Typically this is more work than it is worth and you can just enable and disable if a control is editable. It depends (of course) on the interface elements type.

    You might say “Ok, fine — but which should I use?”

    It depends.

    If you know one of the technologies you should use the one you know.

    If you don’t know them then I would say forms is easier for a simple project like this. (Lots of people will argue with this, it is just my opinion.)

    However, MVC with AJAX is considered the better stack right now because it allows for very complicated UI interactions. More complicated than you are describing. It can also give a better user experience since the UI can be more responsive.


    The state of the data entry would be important in the application. I
    would like the ability to go ‘If fvwMyForm.DefaultMode =
    FormViewMode.ReadOnly’ then … as is done in ASP.net.

    This does not make sense. Unless you are using forms there won’t be any variables on the server (or in the StateBag) which correspond to the state of editing. If you want this then you have to use forms and not jQuery to change your state. You will need a server round trip to change this variable.

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

Sidebar

Related Questions

i am researching about Hierarchical data by using ms sql .Here is my db
I've been researching about adding Arabic localisation into our software. I understand that mirroring
I'm researching about an issue that looks like this: struct A { ... }
I have been researching all over the internet about this, and unfortunately cannot find
I have been researching and have some few ideas about a distributed caching system
I have spent several days now researching Hibernate and have several small questions about
After researching a bit how the different way people slugify titles, I've noticed that
After researching various hosts, I still get the feeling that it is somewhat impossible
I'm researching options to synchronize external data to a Category and Keyword list. I
i've been researching this for about 3 hours now with no gravy so I

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.