![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
.NET学习之旅
寒冰的暖
小码农的知识分享,作为一个备忘录,将自己的开发经验总结发布出来,共同进步
展开
-
asp.net调用api
传入参数转为Jsonstring parameters = JsonConvert.SerializeObject(parameters);调用apipublic bool Fetch(out string results, string url, string type = "GET", string parameters = "",params KeyValuePair<string, string>[] headerParams){try{using (HttpClient原创 2021-06-16 14:23:12 · 844 阅读 · 0 评论 -
asp.net fine ui 导出EXCEL
A.基础Microsoft.Office.Interop.Excel.Application app = null;Microsoft.Office.Interop.Excel.Workbook workbook = null;Microsoft.Office.Interop.Excel.Worksheet sheet = null;object missing = System.Reflection.Missing.Value;string strPath = string.Empty;str原创 2021-06-16 14:20:30 · 98 阅读 · 0 评论 -
加密和解密-AES对称加密
public static class aesMethod { private static readonly byte[] salt = Encoding.Unicode.GetBytes("icecream"); private static readonly int inerations = 2000; public static string Encrypt(string plainText, string password) ..原创 2021-06-10 13:25:09 · 144 阅读 · 0 评论 -
asp.net 引用webapi接收返回的Json类型数据
在网上查到了一些例子加上自己的一些修改,改写了这个方法 private async Task<string> InvokeWebapi(string strurl, string strapi, string strtype, string strJson) { HttpClient client = new HttpClient...原创 2020-02-23 10:06:38 · 2103 阅读 · 0 评论 -
C#关于数组的理解
一维数组//直接定义并赋值一个长度为3的数组int [] a={1,2,3};//定义一个长度为3的数组,然后给数组赋值int [] b=new int[3];//赋值(1)b[0]=1;b[1]=2;b[3]=3;//赋值(2)b = new int[] { 1, 2, 3 };//定义int [] c=new int[]{};//当定义数组长度的时候,一定要问数组赋值,如原创 2016-11-15 16:01:40 · 394 阅读 · 0 评论 -
Asp.net,C# —两种对称加密类实例学习
一:DES加密算法:using System;using System.Collections.Generic;using System.Text;using System.Configuration; using System.IO; using System.Security; using System.Security.Cryptography; name转载 2015-01-20 10:47:43 · 390 阅读 · 0 评论 -
asp.net登陆时候记住用户名密码
页面上添加两个文本框,和一个记住密码的选项框,按钮的事件如下:protected void Button1_Click(object sender, EventArgs e) {//选项框被选中 if (CheckBox1.Checked==true) { //保存cookie SaveCookie(TextBox1原创 2017-03-01 09:21:20 · 2607 阅读 · 0 评论 -
ASP.NET DataTextFormatStri…
原文地址:DataTextFormatString 格式表">ASP.NET DataTextFormatString 格式表作者:陈骏DataTextFormatString="{0:Axx}"用來取得或設定文字型別的資料該如何顯示A 為格式字元xx 是指數字位數或小數點位數,如果沒有指定小數點的位數,大部份格式的預設值為2,超過的位數會自動四捨五入。格式字转载 2017-03-01 09:21:09 · 336 阅读 · 0 评论 -
win7 64位DCOM配置(关于导出…
【解决方案1】1:在服务器上安装office的Excel软件.2:在"开始"->"运行"中输入dcomcnfg.exe启动"组件服务"3:依次双击"组件服务"->"计算机"->"我的电脑"->"DCOM配置"4:在"DCOM配置"中找到"MicrosoftExcel应用程序",在它上面点击右键,然后点击"属性",弹出"Microsoft Excel 应用程序属性"对话框5:点击"标识原创 2017-03-01 09:21:06 · 2074 阅读 · 0 评论 -
Retrieving the COM&nbs…
这两天用ASP.NET写一个导入EXCEL数据到ORACLE的程序,调试通过,但是部署到服务器上就不能用了。Retrieving the COM class factory for component with CLSID{00024500-0000-000 后来终于解决:在服务器上,1,运行dcomcnfg打开组件服务2,依次展开"组件服务"->"计算机"->"我的电脑原创 2017-03-01 09:21:03 · 219 阅读 · 0 评论 -
C#导出带有格式的Excel(列宽,合…
Microsoft.Office.Interop.Excel.Application excel1 = newMicrosoft.Office.Interop.Excel.Application();Worksheet worksheet1= (Worksheet)excel1.Worksheets[1];Microsoft.Office.Interop.Excel.Range rang原创 2017-03-01 09:21:00 · 2253 阅读 · 0 评论 -
C#操作Word模板并且修改书签
原文地址:C#操作Word模板并且修改书签作者:大坏蛋//生成WORD程序对象和WORD文档对象 Microsoft.Office.Interop.Word.Application appWord = new Microsoft.Office.Interop.Word.Application(); Microsoft.Office.Int转载 2017-03-01 09:20:45 · 2831 阅读 · 0 评论 -
.NET刷新页面的六种方法
第一: private void Button1_Click( object sender, System.EventArgs e) { Response.Redirect( Request.Url.ToString( )); } 第二: private void Button2_Click( object sender, System.EventArgs e)原创 2017-03-01 09:20:42 · 862 阅读 · 0 评论