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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:39:48+00:00 2026-06-08T18:39:48+00:00

When testing/debugging an ASP.NET MVC application, it’s common to submit a form and then

  • 0

When testing/debugging an ASP.NET MVC application, it’s common to submit a form and then check all of the name/value pairs to make sure

  1. All of the expected keys are present
  2. All of the expected keys have the expected values

Debugging in Visual Studio is great for checking if a single variable (or even a simple object) contains the expected value(s), and as far as a FormCollection, it’s pretty easy to check the presence of the keys. However, checking the key/value pairings in a FormCollection is a huge hassle. Is there a simple way to get Visual Studio to list the keys and their values side-by-side for a quick check?

  • 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-08T18:39:49+00:00Added an answer on June 8, 2026 at 6:39 pm

    Just a quick custom check

        public void Edit(FormCollection team)
        {
            System.Text.StringBuilder st = new System.Text.StringBuilder();
    
            foreach (string key in team.Keys)
            {
                st.AppendLine(String.Format("{0} - {1}", key, team.GetValue(key).AttemptedValue));
            }
    
            string formValues = st.ToString();
            //Response.Write(st.ToString());
        }
    

    You can then place your mouse on formValues to check the key-value. Clicking the magnifier would reveal the Key-Values

    enter image description here

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

Sidebar

Related Questions

While writing an asp.net project i may have this url for testing/debugging http://localhost:1234/ I
Using VS2008 on my local dev machine, when I run my asp.net Web Application
Visual studio unit testing starts all tests when I use Start Debugging from Debug
Usually I don't have problems writing assembly and testing and debugging. But then sometimes
I am struggling in seting up a the basic architecture for my ASP.NET MVC
I have a custom MembershipProvider that I'm using in an ASP.NET 2.0 application. Inside
I have an ASP.NET app using Windows authentication, and I'm testing for the existence
When I right click on ASP.NET development server, it says http://localhost:1394/testing as the ROOT
I want to run my new web application with forms authentication under the ASP.NET
Due to ongoing issues with ASP.NET MVC 4 and WebAPI, see link: MVC 4

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.