textboxfor的值始终为控制器操作的null

时间:2016-07-19 09:03:34

标签: jquery asp.net-mvc-5

我正在使用jquery将电子邮件ID从视图传递给控制器​​,但它总是向控制器传入null。

查看:

<div class="floating-box"> 
            <span style="font-size:12px; text-align: justify;">sample text here</span>
                </div>
        <div class="floating-box">
            <span style="font-size:12px; text-align: justify;">sample text here</span>
                </div>
        <div class="floating-box">	
            <span style="font-size:12px; text-align:justify;">sample text here</span>
                </div>
        <div class="floating-box">	
            <span style="font-size:12px; text-align:justify;">sample text here</span>
                </div>
        <div class="floating-box">	
            <span style="font-size:12px; text-align:justify;">sample text here</span>
                </div>
        <div class="floating-box">	
            <span style="font-size:12px; text-align:justify;">sample text here</span>
                </div>
        <div class="floating-box">	
            <span style="font-size:12px; text-align:justify;">sample text here</span>
                </div>
        <div class="floating-box">	
            <span style="font-size:12px; text-align:justify;">sample text here</span>
                </div>

jQuery代码:

@Html.TextBoxFor(m => m.receiversEmailID)

问题如下:

我尝试使用modelbinding而不是像上面那样传递它,但模型也变为null。如何解决这个问题?

0 个答案:

没有答案