小编use*_*549的帖子

在Controller中获取HTML控件值

我想在控制器中获取HTML文本框值.以下是我的观看代码

@using (Html.BeginForm("SaveValues", "TestGrid",FormMethod.Post))
{
<table>
 <tr>
    <td>Customer Name</td>
    <td>
        <input id="txtClientName" type="text" />
     </td>
    <td>Address</td>
    <td>
        <input id="txtAddress" type="text" /></td>
    <td>
        <input id="btnSubmit" type="submit" value="Submit" /></td>
    </tr>
</table>}
Run Code Online (Sandbox Code Playgroud)

请检查下面的控制器代码以获取值

[HttpPost]
    public ActionResult SaveValues(FormCollection collection)
    {
        string name = collection.Get("txtClientName");
        string address = collection.Get("txtAddress");
        return View();
    }
Run Code Online (Sandbox Code Playgroud)

我得到空值

asp.net-mvc

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

在C#.Net中打开,编辑和保存PDF文件

我需要打开现有的pdf文件,需要添加一些注释或编辑现有内容并保存相同的文件.

我花了这么多时间在这上面,大多数人都提到了itextsharp或pdf小丑,但遗憾的是没有得到任何样本或如何使用itextsharp或pdf小丑来满足要求.

提前致谢

c# pdf itextsharp pdfclown

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

标签 统计

asp.net-mvc ×1

c# ×1

itextsharp ×1

pdf ×1

pdfclown ×1