@html.checkboxfor asp.net中的问题mvc 5 C# [英] @html.checkboxfor problem in asp.net mvc 5 C#

查看:50
本文介绍了@html.checkboxfor asp.net中的问题mvc 5 C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家早上好。



我有一个问题,我已经尝试了我能想到的一切,并在网上搜索,无法找到解决方案。



我有一个复选框,只是告诉数据库字段是否为真。此复选框的数据端可以完美地发布和检索数据库。



我的问题是当用户点击复选框(无论是Internet Explorer还是谷歌浏览器)时,复选框向左移动,然后你必须将光标移到顶部再次单击。



这是我的标记。希望有人可以提供帮助:



Good morning all.

I have a problem that I've tried everything I can think of and searched the net and cannot find a resolution.

I have a check box that simply tells the database whether a field is true or not. The data side of this checkbox works perfectly both posting and retrieving to/from the database.

My problem is when the user clicks the check box (regardless of Internet Explorer or Google Chrome) the checkbox shifts to the left and then you have to move your cursor over top of it to click again.

Here is my markup. Hopefully someone can help:

<td style="padding-removed15%; text-align:center">
                            @Html.CheckBoxFor(model => model.DeviceModel.MulesAccess)
                            @*@Html.ValidationMessageFor(model => model.DeviceModel.MulesAccess)*@
                        </td>





谢谢你们的时间。



Thank you guys for your time.

推荐答案

我认为我找到了解决方案。抱歉打扰你们。它似乎是填充复选框的填充。我从标记中取出填充物并保持固定。
I think I found the solution. Sorry to bother you guys. It appears it is the padding that is messing up the check box. I took the padding out of the markup and it stays fixed.


这篇关于@html.checkboxfor asp.net中的问题mvc 5 C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆