Search Results

Search found 3 results on 1 pages for 'nikron'.

Page 1/1 | 1 

  • ASP.NET MVC:Why does the CheckBoxFor render an additional input tag and how can I get the value usin

    - by Nikron
    Hi, In my ASP.NET MVC app I am rendering out a checkbox using the following code: <%= Html.CheckBoxFor(i=>i.ReceiveRSVPNotifications) %> Now I see that this renders both the checkbox input tag and a hidden input tag. The problem that I am having is when I try retrieve the value from the checkbox using the FormCollection: FormValues["ReceiveRSVPNotifications"] I get the value "true,false". When looking at the rendered out HTML I can see the following: <input id="ReceiveRSVPNotifications" name="ReceiveRSVPNotifications" value="true" type="checkbox"> <input name="ReceiveRSVPNotifications" value="false" type="hidden"> So the FormValues collection seems to join these two values since they have the same name. Any Ideas?

    Read the article

  • How to convert a 2-d array into a dictionary object

    - by Nikron
    Hi, I have an array of type string that looks like this: "test1|True,test2|False,test3|False,test4|True". This is essentially a 2d array like so [test1][True] [test2][False] [test3][False] [test4][True]. I want to convert this into a dictionary<string,bool> using linq, something like: Dictionary<string, bool> myResults = results.Split(",".ToCharArray).ToDictionary() any ideas?

    Read the article

1