.NET
.NET-小棠
成功没有捷径可走,只有脚踏实地的努力
展开
-
ASP.NET enum枚举类型使用例子
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class enum_Default : System.Web.UI.Page{ //自定义枚举 enum name { Andrew=8,原创 2020-11-19 23:38:01 · 264 阅读 · 0 评论 -
ASP.NET 装箱例子
前端<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="装箱_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="htt原创 2020-11-19 23:28:58 · 78 阅读 · 0 评论 -
ASP.NET bool布尔类型使用例子
前端<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="bool_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="h原创 2020-11-19 23:21:23 · 464 阅读 · 0 评论 -
ASP.NET WEB入门第一个程序
前端<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http:原创 2020-11-19 23:03:16 · 173 阅读 · 0 评论 -
ASP.NET_页面中弹出对话框帮助类
//页面中弹出对话框 public class MessageBox { private MessageBox() { } #region 显示消息提示对话框 /// <summary> /// 显示消息提示对话框 /// </summary> /// <param name="page">当前页面指针,一般为this&...原创 2020-11-16 10:23:40 · 130 阅读 · 0 评论 -
ASP.NET_Cache缓存帮助类
public class CacheHelper { /// <summary> /// 获取数据缓存 /// </summary> /// <param name="CacheKey">键</param> public static object GetCache(string CacheKey) { System.Web.Cach原创 2020-11-16 10:18:16 · 179 阅读 · 0 评论 -
ASP.NET_转换人民币大小金额
/// <summary> /// 转换人民币大小金额 /// </summary> /// <param name="num">金额</param> /// <returns>返回大写形式</returns> public static string CmycurD(decimal num) { strin原创 2020-11-16 10:13:44 · 261 阅读 · 0 评论 -
ASP.NET_常用正则验证
/// <summary> /// 验证是否为正整数 /// </summary> /// <paramname="str">待验证字符串</param> /// <returns>是|否</returns> public static bool IsInt(string str) { return Regex.IsMatch(str, @"^[0-9]*$");...原创 2020-11-16 09:23:07 · 369 阅读 · 0 评论 -
JS AJAX传递中文乱码处理
前端 //编码处理 encodeURI("中文");后端//解码处理Server.UrlDecode();原创 2020-11-07 10:49:36 · 201 阅读 · 0 评论 -
ASP.NETRepeater中生成“序号”列
<asp:Repeater ID="TopImgListRep" runat="server"><ItemTemplate><div class="swiper-slide">序号:<%# Container.ItemIndex + 1 %></div></ItemTemplate></asp:Repeater>原创 2020-10-31 11:50:46 · 173 阅读 · 0 评论 -
ASP.NET中在线用户统计
Default.aspx前端代码<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>在线用户</title原创 2020-10-25 08:04:45 · 154 阅读 · 0 评论 -
ASP.NET_爬虫HtmlAgilityPack
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using HtmlAgilityPack;//引用爬虫DLLusing System.Text;using DotNet;using System.Net;using System.IO;public partial c原创 2020-10-22 12:16:21 · 172 阅读 · 0 评论