解释如何在mvc4中绑定webgrid [英] explain how to bind webgrid in mvc4
本文介绍了解释如何在mvc4中绑定webgrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcApplication1.Models;
using System.Data;
using System.Data.SqlClient;
namespace MvcApplication1.Controllers
{
public class registrationController : Controller
{
LoginEntities db = new LoginEntities();
public ActionResult login()
{
return View();
}
[HttpGet]
public ActionResult registration(MvcApplication1.Models.tbl_registration obj)
{
// List<login> lgn = new List<login>();
// login log = new login();
// var regno = log.regno;
// var name = log.password;
//var para=new SqlParameter{ParameterName="@regno", Value=regno};
//var para1=new SqlParameter{ParameterName="@name", Value=name};
//SqlConnection con=new SqlConnection
return View();
}
//List<registration> reg = new List<registration>();
// registration regist = new registration();
// regist.regno = "";
// regist.name = "";
// regist.mobile = 0;
// regist.gender = 0;
// regist.country = 0;
}
}
推荐答案
CodeProject中有关于Web Grid的文章,因此您可以将它们作为起点:
ASP.NET MVC4中的WebGrid [ ^ ]
ASP.NET MVC中的WebGrid - 6个重要提示 [ ^ ]
There are articles in CodeProject about Web Grid, so you could use them as starting point:
WebGrid in ASP.NET MVC4[^]
WebGrid in ASP.NET MVC – 6 important tips[^]
W3Schools Tutorials [ ^ ]
在mvc中创建一个简单的web网格 [ ^ ]
这些也是很好的链接Raul提供的链接。
我希望这些可以帮助您成功创建网格。
谢谢。
W3Schools Tutorials[^]
Creating a simple web grid in mvc[^]
These are also few good links along with the links provided by Raul.
I hope these helps you succeed in creating the web grid.
Thanks.
这篇关于解释如何在mvc4中绑定webgrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文