- 博客(10)
- 资源 (5)
- 收藏
- 关注
原创 C# 程序集、DLL初始化函数
C# 程序集、DLL初始化函数 在程序集被使用时执行。 class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); new Class1().Test(); } } public class Class1 { public Class1()
2021-06-18 10:33:47 732
原创 前端table2excel.js导出Excel
$('#deriveexcal').click(function () { $(".sFData").table2excel({ // 不被导出的表格行的class类 exclude: ".noExl", // 导出的Excel文档的名称 name: "表格-" + new Date().getTime(), // E...
2020-12-31 09:58:16 749
原创 HTML下载生成WORD 和PDF,及导出图片不能正常显示解决方案
<!DOCTYPE html><html class="pdfhtml" id="pdfhtml"><head lang="en"> <meta charset="UTF-8"> <title>html导出生成word文档</title></head><body class="word"> <style type="text/css"> t..
2020-12-15 19:23:39 1987
原创 MVC路由 自定义路由
1、Global.asax文件注册路由(创建MVC项目时就有)public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { RouteConfig.RegisterRoutes(RouteTable.Ro...
2020-04-27 20:07:33 637
原创 MVC 过滤器 权限过滤器 方法执行前 方法执行后 异常过滤器 全局注册过滤器
名称类默认实现执行顺序描述授权过滤器CustomAuthorizeAttributeAuthorizeAttribute1常用于登录验证,权限验证等方法过滤器CustomActionFilterAttributeActionFilterAttribute2常用于记录方法执行日志等异常过滤器CustomHandleErrorAttribute...
2020-04-24 09:14:02 310
原创 扩展属性
1、调用class Program { static void Main(string[] args) { //实例化一个学生对象 Student s = new Student("张三", new DateTime(1994,1,29)); //输出该学生姓名 生日 年龄 ...
2020-04-23 14:12:57 212
原创 MVC传值 ViewData、ViewBag、TempData
结论1、ViewData、ViewBag只可以在当前视图不限次数使用2、TempData可以在当前视图或者跨视图传递。但只能使用一次。3、ViewData、ViewBag值可以互取,TempData基于Session实现不能与ViewData、ViewBag值互取4、ViewBag是基于ViewData的实现。同Key时值会被覆盖 public class HomeController ...
2020-04-21 18:36:35 352
原创 C# 自定义函数 内置函数 扩展方法
/// <summary> /// 自定义函数帮助类 注需要有 STATIC关键字,自定义行数也需要有STATIC关键字,且第一个参数类型前加关键字 this /// </summary> public static class CustomFunHelper { #region ToMoney:将金额处理成指定位数并在前面添加‘¥’符号 ...
2020-04-19 13:12:50 857
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人