小编Dan*_*ady的帖子

ASP.NET MVC视图模型不使用DropDownList绑定HTTP Post

我有一个问题,当我发布到控制器时,我失去了绑定,我的视图模型中的所有内容都是NULL.这是我正在使用的代码:

视图:

@model ArticleCategoryVm

@using (@Html.BeginForm())
{
    @Html.HiddenFor(model => model.LanguageIdDisplayed)

    <label>Name: <span class="label label-important">Required</span></label>
    @Html.HmlValidationFor(model => model.CategoryName)
    @Html.TextBoxFor(model => model.CategoryName, new { maxlength = "255", placeholder = "Category Name", @class = "input-xlarge-fluid" })                  
    <span class="help-block">The is the name of the category and how it appears on the site.</span>

    <label>Language: <span class="label label-important">Required</span></label>
    @Html.HmlValidationFor(model => model.LanguageId)
    @Html.DropDownList("LanguageId", new SelectList(@Model.Languages, "Value", "Text"), "Select language", new { @class="input-xlarge-fluid" })
    <span class="help-block">This will be the language that the category is set too.</span>

    <label>Parent:</label>
    @Html.HmlValidationFor(model …
Run Code Online (Sandbox Code Playgroud)

http-post razor asp.net-mvc-3 asp.net-mvc-viewmodel

16
推荐指数
2
解决办法
3万
查看次数

加载Ajax内容后,Jquery悬停不起作用

我有一个问题,我有一个悬停事件在ajax加载后不起作用,它只适用于初始页面加载...这是我目前使用的代码:

    $(".table tbody tr").hover(
        function () {
            $(this).children('td').children('.operation').children('.btn-group').fadeIn();
        },
        function () {
            $(this).children('td').children('.operation').children('.btn-group').fadeOut();
        }
    );
Run Code Online (Sandbox Code Playgroud)

我知道我需要使用$(document).on()作为选择器,但我不确定正确的语法来执行原始代码中的功能.任何帮助赞赏

jquery

8
推荐指数
1
解决办法
9933
查看次数

在ASP.NET MVC 3中上载大于2GB的文件

我试图在ASP.NET MVC 3项目上上传大于2GB的视频文件,但ASP.NET 4.0的最大文件上载大小似乎是2GB.有没有办法在ASP.NET/IIS中超出此限制?或者另一种方法是解决这个问题?

我也使用uploadify作为我的文件上传控件.任何帮助和资源,以实现这一点赞赏.

干杯

asp.net iis file-upload uploadify asp.net-mvc-3

6
推荐指数
1
解决办法
1553
查看次数

很长的单词没有包装在HTML/CSS中

我有一个问题,如果用户输入一个长注释/单词,如'coooooooooooooooooooooooooooooooooooooooool',这将打破页面上的格式.

下面是一张图片,用于帮助解释场景(不按比例)以及使用的代码:

在此输入图像描述

HTML:

<div class="comment-content">
    <p>cooooooooooooooooooooooooooooooooooooooool</p>
    <br />
    <a class="delete-comment" data-delete-comment-id="28" href="/">Delete</a>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS:

.comment-content
{
    width: 525px; 
    margin: 13px 25px 0 0;
}
.comment-content p
{
    width: 525px;
}
Run Code Online (Sandbox Code Playgroud)

我想知道是否有一个快速解决方案,而不会更改太多的标记和CSS,因为这是代码区域,我们不希望通过更改应用程序代码(用ASP.NET/MVC 3编写)引入错误.

如果CSS/Html不是一个选项,我想HTML 5 <wbr>标签可以用来分隔'x'字符后的单词 - 唯一的问题是该网站是9种语言的多语言.日语和中文例如文本字符明显大于英文文本字符,这些字符需要多个条件代码才能在添加<wbr>或减小字体大小之前获得字符数.刚刚提出最佳解决方案的建议之后.

非常感谢

html css asp.net-mvc html5

5
推荐指数
1
解决办法
1606
查看次数

革命滑块 - “无效的左补间值:NaN”

我在一个项目上使用了 wrapbootstrap 的主题,但我在滑块上得到了一个 Not a number 值,这会导致网站速度出现一些小的性能问题。

这是主题的链接:http : //themes.iamabdus.com/bigbag/1.0/index.html

请查看 chrome 控制台错误:

无效的左补间值:NaN

有谁知道如何解决这个问题?即使快速修复/解决方法也将不胜感激。

javascript jquery revolution-slider

5
推荐指数
1
解决办法
5629
查看次数

无法获得在VS2010中使用IISOle对象的引用

我试图在Visual Studio .NET中获得对Active DS IIS命名空间提供程序的引用.这个引用将使我能够使用IISOle命名空间....

我尝试通过在Visual Studio 2010中执行以下步骤来添加引用:

  1. 添加参考
  2. COM

在我的参考文献列表中,我只能看到"Active DS Type Library",这并不是我需要使用IISOle的参考.我已经读过您需要"Active DS IIS Namespace Provider",但它不会出现在我的列表中.

c# iis-7 visual-studio-2010 windows-7

3
推荐指数
1
解决办法
1662
查看次数

Flutter - 使用自定义十六进制颜色

如何从 Flutter 中的十六进制值添加颜色?例如,我正在尝试以下操作:

Widget build(BuildContext context) {
  return Row(
    children: <Widget>[
      Expanded(
        child: Container(
          padding: EdgeInsets.only(left: 20.0),
          height: 100.0,
          decoration: BoxDecoration(
            color: Color.hex("#183451"),
          ),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.start,
            children: <Widget>[
              Image.asset('assets/main_image.png'),
              // More widgets here
            ],
          ),
        ),
      ),
    ],
  );
}
Run Code Online (Sandbox Code Playgroud)

但得到以下错误:

错误:无法将参数类型“color::Color”分配给参数类型“dart.ui::Color”

这是使用“颜色”包:https : //pub.dartlang.org/packages/color

如果我使用MaterialColor它,它将按预期工作:

color: Colors.blue
Run Code Online (Sandbox Code Playgroud)

我想我需要创建一个MaterialColor,但是这些需要一个整数值和色板。十六进制值是否需要从字符串转换为整数?如果可能的话,我想寻找一些代码示例如何实现这一点:)

提前致谢

dart flutter

3
推荐指数
1
解决办法
1万
查看次数