Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET MVC3 Multilingual website crashing on changing culture name
    primarykey
    data
    text
    <p>n my multilingual website web.config file the culture is set to "be-by" (<code>&lt;globalization culture="be-by" uiCulture="be-by"/&gt;</code>)</p> <p>There is a particular page "create.cshtml" that crashes at the <strong>"model.Product.MaximumCapacity"</strong> code given below</p> <pre><code>&lt;tr&gt; &lt;td&gt; @Html.LabelFor(model =&gt; model.Product.MaximumCapacity): &lt;/td&gt; &lt;td&gt; @Html.EditorFor(model =&gt; model.Product.MaximumCapacity) @Html.ValidationMessageFor(model =&gt; model.Product.MaximumCapacity) &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>In this <strong>"model.Product.MaximumCapacity"</strong>, <strong>MaximumCapacity</strong> is a <strong>column</strong> that takes integer values in the <strong>table Product</strong> The error message is <strong>"Index (zero based) must be greater than or equal to zero and less than the size of the argument list."</strong></p> <p>If i go to the <strong>ActionResult</strong> function in the <strong>controller</strong> of this "create.cshtml", i see "NULL" being retrieved for the "MaximumCapacity" column.</p> <p>But the issue is, this crash is happenning only for the culture "be-by"(Country is Belarus) and not for any other culture i am using for my website.</p> <p>Further when i replace <strong>"model.Product.MaximumCapacity"</strong> with another column say <strong>"model.Product.AbsoluteValue"</strong> where AbsoluteValue is a column taking integer values and <strong>ActionResult</strong> function shows NULL values being retrieved,the application does not crash and the page displays fine for the 'be-by" culture.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload