日期:2014-05-16  浏览次数:20430 次

点击表格里边的数据,然后出现在textbox

我想实现:
点击表格里边的数据,然后出现在textbox,然后我修改好,点击保存就提交到数据库。

点击表格里边的数据,然后出现在textbox是不是要用js来实现,该怎么写,才开始写web不久,请教下?


@model List<VideoCategories>
@{
    ViewBag.Title = "NewAddCategory";
}

@using (Html.BeginForm())
{
    <table width="100%">
        <tr>
            <th>
                编号
            </th>
            <th>
                名称
            </th>
            <th>
                修改
            </th>
            <th>
                <input type="submit" value="删除(D)" onclick="return confirm('确认要删除选中的友情链接类别吗?')" accesskey="D" />
            </th>
        </tr>
        @foreach (var l in Model)
        {
            <tr>
                <td>@l.ID
                </td>
                <td>@l.Name
                </td>
                <td>@Html.ActionLink("修改", "AddEdit", "LinkTypes", new { id = l.ID }, null)
                </td>
                <td class="center">
                    <input type="checkbox" name="ckb_id" value="@l.ID" />
                </td>
            </tr>
        }
    </table>
}

@using (Html.BeginForm())
{


        <fieldset>
            <legend>视频类别</legend>
            <p>
                <label&nbs