上一页 1 2 3 4 5 6 7 8 ··· 19 下一页
摘要: 例如,访问wwwroot下的files/file.pdf public class SendEmailController : Controller { public IActionResult Index() { return View(); } private IWebHostEnvironme 阅读全文
posted @ 2020-06-12 10:29 Kyle0418 阅读(4003) 评论(0) 推荐(0) 编辑
摘要: 由于.Net Core中不再支持HttpPostedFileBase类,因此文件的上传可以使用IFormFile代替。 具体方法如下: 同样,先创建一个Model类来存放数据, public class EmailModel { public string To { get; set; } publ 阅读全文
posted @ 2020-06-11 17:29 Kyle0418 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 首先创建一个Model类来存放数据, public class MailModel { [Required(ErrorMessage = "Please enter the receiver")] public string To { get; set; } public string Subjec 阅读全文
posted @ 2020-06-11 14:49 Kyle0418 阅读(544) 评论(0) 推荐(0) 编辑
摘要: 调用含参方法: $("#btn").click(function () { $.ajax({ type: "Post", url: "WebForm1.aspx/GetStr", data: "{'str':'aaa','str2':'bbb'}", contentType: "applicatio 阅读全文
posted @ 2020-06-08 17:17 Kyle0418 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 方法:JQueryUI ListBox: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1 阅读全文
posted @ 2020-06-05 15:23 Kyle0418 阅读(207) 评论(0) 推荐(0) 编辑
摘要: private void button1_Click(object sender, EventArgs e) { Image myImage = Image.FromFile(@"D:\pic\original.jpg", true); SaveImg(@"D:\pic\reduced.jpg", 阅读全文
posted @ 2020-06-04 17:12 Kyle0418 阅读(660) 评论(0) 推荐(0) 编辑
摘要: In order to add responsive features to the navigation bar, the content to be collapsed must be wrapped in <div> with class “.collapse” and “.navbar-co 阅读全文
posted @ 2020-05-29 16:39 Kyle0418 阅读(346) 评论(0) 推荐(0) 编辑
摘要: To pop up a form in MVC, we can use bootstrap modal dialog to achieve it. First, define an enum in Model as the source of DropDownList. namespace Test 阅读全文
posted @ 2020-05-28 16:27 Kyle0418 阅读(379) 评论(0) 推荐(0) 编辑
摘要: In order to make each cell editable, we can use the TextBox control to fill the GridView‘s cell. We can use “TemplateField.ItemTemplate” property to s 阅读全文
posted @ 2020-05-27 15:55 Kyle0418 阅读(687) 评论(0) 推荐(0) 编辑
摘要: 通过代码实现Win+D,Win+E等等,可以参考以下代码: [DllImport("User32.dll")] public static extern void keybd_event(Byte bVk, Byte bScan, Int32 dwFlags, Int32 dwExtraInfo); 阅读全文
posted @ 2020-04-20 14:26 Kyle0418 阅读(226) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 19 下一页