小编Raj*_*aja的帖子

Microsoft JScript运行时错误:对象不支持属性或方法'live'?

我点击按钮显示以下错误"Microsoft JScript运行时错误:对象不支持属性或方法'实时'" 我的查看页面如下:

@model Charis.Models.Products
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<link href="../../Content/CharisSite.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
@using (Html.BeginForm("Create", "Prod", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <table><tr><td>
    <table>
    <tr>
    <td>
     <fieldset>
             <legend>Products</legend>

     <table>
        <tr>
        <td>
            <div class="editor-label">
            @Html.LabelFor(model => model.Productname)
            </div>
        </td>
        <td>
             <div class="editor-field">
            @Html.EditorFor(model => model.Productname)
            @Html.ValidationMessageFor(model => model.Productname)
            </div>
        </td>
        </tr>
        <tr>
        <td>
            <div class="editor-label">
                @Html.LabelFor(model => model.ProductPrice)
            </div>
        </td>
        <td>
            <div class="editor-field">
            @Html.EditorFor(model => model.ProductPrice)
            @Html.ValidationMessageFor(model => model.ProductPrice) …
Run Code Online (Sandbox Code Playgroud)

jquery asp.net-mvc-3

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

如何使用MVC3从db显示多个图像

我是新手,MVC.我保存了图像和一些数据,但无法显示保存的图像.我想在主页面中显示所有已保存的图像.

模型:从模型中获取数据库列表

public List<Products> GenreList()
        {
}
Run Code Online (Sandbox Code Playgroud)

调节器

public ActionResult MYsample()
{
    var MyList = storeDB.GenreList();
    var a= MyList.Count;

    if (a != null)
    {
        foreach (var li in MyList)
        {
            return File(li.fileContent, li.mimeType,li.fileName);
        }
    }
    return View(MyList);
}
Run Code Online (Sandbox Code Playgroud)

视图

    @foreach (var item in Model)
    {
            <img src="@Url.Action("MYsample", "HomeController", new { id = item.ProductID })" alt="@item.Productname" />
    }  
Run Code Online (Sandbox Code Playgroud)

asp.net asp.net-mvc-3

2
推荐指数
1
解决办法
2609
查看次数

标签 统计

asp.net-mvc-3 ×2

asp.net ×1

jquery ×1