如何在Double参数中接受逗号分隔符

问题描述

从View到Controller,我想发送一个字段,其中包含一个必须采用以下格式的数字:N,NNN。问题在于,当它发送给控制器以double参数的形式时会出错,因为它仅接受点。如何更改此设置?

 <div class=""><input type="text" value="0,000" id="volume" aria-describedby="" placeholder="Volume"> </div>

js:

 window.location.href = "/MyPrintLabelTest/StampaEtichetta/DownloadLabel?nColli=" + nColli + "&mittentealfa=" + mittentealfa + "&volume=" + volume; //PrintSuccess

控制器c#:

public ActionResult DownloadLabel(int nColli,string mittentealfa, 双倍音量){....}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)