随笔分类 - 【后端】--C#
C#的使用
摘要:VS中新建项目-Web-ASP.NET Web应用程序 然后确定,选择空模版就可以了,勾上Webapi(也可以选择webapi模板,这样生成的文件比较多) 添加好之后Controllers和Models文件夹是没有文件的,下面是我新建文件之后的页面 新建Models时选择类就可以了 新建Contro
阅读全文
摘要:VS中新建项目-Web-ASP.NET Web应用程序 然后确定,选择空模版就可以了 其中CRMService.asmx是点击项目新建Web服务(asmx) 这样基本的功能就能用了,然后就是发布 点击项目右键发布到文件系统就可以了
阅读全文
摘要:HttpWebResponse resp = (HttpWebResponse)wRequest.GetResponse(); Stream stream = resp.GetResponseStream(); Image img = Image.FromStream(stream); byte[]
阅读全文
摘要:在服务端代码文件中加上struct结构体就能解决 这样就直接可以反序列化成LocationInfo了 并且是可以结构体里面嵌套结构体的 这是嵌套的 可以直接使用
阅读全文
摘要:先要继承页面的System.Web.UI.Page 使用的时候用 获取就行了
阅读全文
摘要:使用dt.Rows[0]["name", DataRowVersion.Original]可以获取
阅读全文
摘要:在websrvice发布文件的webconfig中加入 <httpRuntime maxRequestLength="102400" /> <webServices> <protocols> <add name="HttpPost" /> <add name="HttpGet" /> </proto
阅读全文
摘要:WebService中发布之后出现这个错误, 解决方法: web.config文件中的 <system.web> 节点下加入:<webServices> <protocols> <add name= "HttpPost"/> <add name= "HttpGet"/> </protocols></
阅读全文
摘要:在system.webServer节点下加上(.Net接口) <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Methods" value="OPTIONS,POST,GET" /> <add name="Access-C
阅读全文
摘要:先添加QRCoder NuGet程序包(生成二维码要用到) // 生成二维码的内容 string strCode = “123456”; QRCodeGenerator qrGenerator = new QRCoder.QRCodeGenerator(); QRCodeData qrCodeDat
阅读全文
摘要:解决方法添加引用using System.Collections.Generic;
阅读全文
摘要:txt文本框设为密码模式后,因为安全问题,后台(服务器端)设置不了值,只有在前台(客户端)复制才能显示
阅读全文
摘要:string sss = File.ReadAllText("E:\\FM\\Mall\\MallSGWeb\\MallSGWeb\\MALL_simple\\File\\11111.html"); string stroutput = sss.Replace("</p>", "</p><br />
阅读全文