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

  • Home
  • SEARCH
  • 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 9054851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:47:27+00:00 2026-06-16T13:47:27+00:00

public class UnitTest1 { [TestMethod] public void TestMethod1() { var key = new Dictionary<string,

  • 0
public class UnitTest1
{
    [TestMethod]
    public void TestMethod1()
    {
        var key = new Dictionary<string, object>();
        key.Add("CPLID", new object());
        key.Add("EqID", new object());
        key.Add("Shift", new object());
        key.Add("DateTime", new object());
        key.Add("UpdateDateTime", new object());
        key.Add("No", new object());
        key.Add("LineStop.Remark", new object());
        key.Add("IsRemark", new object());
        key.Add("DispatchID", new object());
        key.Add("CopperID", new object());
        key.Add("CopperLV", new object());
        key.Add("InThickness", new object());
        key.Add("InWidth", new object());
        key.Add("OutWidth", new object());
        key.Add("OutLength", new object());
        key.Add("OutPiece", new object());
        key.Add("WeldingNum", new object());
        key.Add("GuideNum", new object());
        key.Add("Supply", new object());
        key.Add("Produce", new object());
        key.Add("ReturnMaterial", new object());
        key.Add("StartTime", new object());
        key.Add("EndTime", new object());
        key.Add("PrelineNum", new object());
        key.Add("SelflineNum", new object());
        key.Add("ProcessModeNum", new object());
        key.Add("ProcessResultNum", new object());
        key.Add("ProcessMode[0].CopperID", new object());
        key.Add("ProcessMode[0].Mode", new object());
        key.Add("ProcessMode[1].CopperID", new object());
        key.Add("ProcessMode[1].Mode", new object());
        key.Add("ProcessMode[2].CopperID", new object());
        key.Add("ProcessMode[2].Mode", new object());
        key.Add("ProcessMode[3].CopperID", new object());
        key.Add("ProcessMode[3].Mode", new object());
        //key.Add("ProcessMode[4].CopperID", new object());
        //key.Add("ProcessMode[4].Mode", new object());
        DictionaryValueProvider<object> ob = new DictionaryValueProvider<object>(key, CultureInfo.CurrentCulture);

        Assert.IsTrue(ob.ContainsPrefix("ProcessMode"));
    }
}

Above sample test code running in MVC3 is work.
howerver, “ContainsPrefix” method is fine at MVC3,but It’s don’t work correct at MVC4.

And then, when I try to add more item. Something like
ProcessMode[4].CopperID and ProcessMode[4].Mode (remove comment)..
It work correct at MVC4.

I think it is very strange,

The problem sometimes make an error: “Post a ajax with json content” and DefaultModelBinder that it produce an data which it is faule.

Is the method ContainsPrefix is different in MVC3 and MVC4?

12/7 update

http://forums.asp.net/t/1856357.aspx/1?FormValueProvider+skips+form+values

the same question, it let me cant use MVC4

search for prefixes string with ‘binary search’

make the ‘.’ and ‘[‘ skips match

  • 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-16T13:47:28+00:00Added an answer on June 16, 2026 at 1:47 pm

    I found the solution……………………….:

    http://weblogs.asp.net/imranbaloch/archive/2012/12/08/fixing-model-the-binding-issue-of-asp-net-mvc-and-asp-net-web-api.aspx

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

Sidebar

Related Questions

public class Test { public static void main(String[] args) { DemoAbstractClass abstractClass = new
public class fraktal extends JFrame { public fraktal (String args[]) { calc = new
public class MyClass { public string MyProperty{ get; set; } Now, I would like
public class A { private A(int param1, String param2) {} public static A createFromCursor(Cursor
public class LinkedList { Object contents; LinkedList next = null; public boolean equals(Object item)
So, I was not totally sure this was true: [TestClass] public class UnitTest1 {
public class TestData { public static final String DATA = A; // I change
There is a function: public class MyCacheClass : ICache { public void T GetObject<T>(Func<T>
public class SoftwareTest extends UnitTest { @Before public void setup() { Fixtures.deleteAll(); // will
Here is my test: [TestFixture] public class DisplayingPageLinks { [Test] public void Can_Generate_Links_To_Other_Pages() {

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.