上一页 1 2 3 4 5 6 7 ··· 19 下一页
摘要: 首先,在Solution Explorer下新建一个Areas文件夹。 然后右击该文件夹,选择“Add” -> “Area”,新建Area。如下所示: 然后分别设置其相应的Controller和View。 AnotherController.cs [Area("AnotherArea")] publ 阅读全文
posted @ 2020-07-15 17:19 Kyle0418 阅读(1258) 评论(0) 推荐(0) 编辑
摘要: 首先,新建一个edmx绑定数据库中的表。 JsonController.cs public class JsonController : Controller { // GET: Json public ActionResult Index() { return View(); } [HttpPos 阅读全文
posted @ 2020-07-09 17:36 Kyle0418 阅读(1041) 评论(0) 推荐(0) 编辑
摘要: 以下是使用Chart.JS绘制Gauge图的例子。 WebForm.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="chartjs.WebForm1" %> <!DO 阅读全文
posted @ 2020-07-08 16:02 Kyle0418 阅读(896) 评论(0) 推荐(0) 编辑
摘要: WebForm1.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="sweetalert.WebForm1" %> <!DOCTYPE html> <html xmln 阅读全文
posted @ 2020-06-30 15:23 Kyle0418 阅读(378) 评论(0) 推荐(0) 编辑
摘要: First, add the dll to Reference and set Copy Local to False. Then create a new project folder "libs", copy the referenced dll into this folder, and se 阅读全文
posted @ 2020-06-29 13:58 Kyle0418 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 首先,声明一个学生类。 public class Student { public string Name { get; set; } public string Age { get; set; } } 在页面首次打开时,使用DataSource属性和DataBind方法为GridView绑定数据源 阅读全文
posted @ 2020-06-22 14:56 Kyle0418 阅读(910) 评论(0) 推荐(0) 编辑
摘要: 首先,新建一个ASP.NET项目,然后添加新项“Web Service(.asmx)”,命名为MathService。向类中添加方法,注意:只有包含WebMethod特性的方法才可以作为Web服务进行远程访问。 public class MathService : System.Web.Servic 阅读全文
posted @ 2020-06-22 11:19 Kyle0418 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 定义自定义控件: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="TemplateTest.WebUserControl1" %> <asp:Label I 阅读全文
posted @ 2020-06-18 13:12 Kyle0418 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Model: public class TestModel { [Required] public string Id { get; set; } } Controller: public class TestController : Controller { // GET: Test public 阅读全文
posted @ 2020-06-16 16:09 Kyle0418 阅读(1449) 评论(0) 推荐(0) 编辑
摘要: Model: public class TestModel { [Required] public string Id { get; set; } } Partial View(PartialInput.cshtml): @model partialview.Models.TestModel @us 阅读全文
posted @ 2020-06-16 11:03 Kyle0418 阅读(547) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 19 下一页