随笔分类 -  C#

C#
摘要:问题描述:“/”应用程序中的服务器错误。分析器错误说明:在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。分析器错误消息:未能加载类型“System.Web.Mvc.ViewPage”。源错误:行 1: " %>行 2: 行 3: 源文件:/Views/Bulletin/Index.aspx 行:1版本信息:Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.17929解决方案:http://stackoverflow.com/questions/4677615/could 阅读全文
posted @ 2013-07-06 13:05 xyzla 阅读(1466) 评论(0) 推荐(0) 编辑
摘要:先举个例子:代码如下:class Program { static void Main(string[] args) { Console.WriteLine(Sum(1)); Console.WriteLine(Sum(1, 2, 3)); Console.WriteLine(Sum(1, 2, 3, 4, 5)); Console.ReadKey(); } private static int Sum(params int[] values) { int sum = 0; foreach (int value in values) sum += value; return sum; } } 阅读全文
posted @ 2013-06-29 17:20 xyzla 阅读(390) 评论(0) 推荐(0) 编辑
摘要:??运算符(C# 参考)http://msdn.microsoft.com/zh-cn/library/ms173224.aspx可以为 null 的类型(C# 编程指南)http://msdn.microsoft.com/zh-cn/library/1t3y8s4s.aspxNullable 结构... 阅读全文
posted @ 2013-06-29 17:17 xyzla 阅读(1415) 评论(0) 推荐(0) 编辑
摘要:----------------------Windows Phone 7手机开发、.Net培训、期待与您交流! ----------------------号外:笔记下载 黑马程序员_看视频记笔记_29-40枚举\常量\结构确定数量、确定值的几个取值:东西南北、男女、上中下。enum Gender{male,female}enum QQStatus{online,offline,hidden}枚举的用法,QQStatus status = QQStatus.online;和用字符串比起来,用枚举的好处就是限定了变量的取值范围,程序处理起来更方便。const 类型 常量名 = 常量值stati 阅读全文
posted @ 2012-10-06 10:41 xyzla 阅读(968) 评论(2) 推荐(0) 编辑
摘要:做了近四个月的登录,对登录也有了一定的认知,包括用户角色与用户权限,以及通过各种流行API(QQ api,Sina API等)去实现登录。 在这里讲讲自己在C/S项目中用到的QQ API及Sina API的登录吧,都是通过使用OAuth2。0授权认证的,当然这里面也包含了跨域调用,跨域可以专门划分为一个专题,园子里面也已经有了很多人在介绍,这里就不在赘述了。功能:当单击登录按钮时,弹出登陆框,通过使用WebBrowser来加载页面,输入用户名密码(在服务器端获取不到用户的用户名与密码的,这是OAuth2.0的授权机制在作怪,更多的是为了保护用户的信息安全性),并获取其页面中的值,来更... 阅读全文
posted @ 2012-07-17 06:19 xyzla 阅读(5068) 评论(9) 推荐(7) 编辑
摘要:以资料整理为目的,汇总一下自己从事于这近两年多的软件开发中常用的T-SQL,涵盖存储过程,分页,行转列、列转行,锁,全局变量,聚焦索引…… 可能一说到T-SQL与PL/SQL大家可能有很多认知上的不足(本人也是迷糊了好长时间,才懂得其中内涵) 百度百科 名片介绍:T-SQL PL/SQL 简单点理解 阅读全文
posted @ 2012-07-16 22:55 xyzla 阅读(5702) 评论(12) 推荐(22) 编辑
摘要:C/S项目需求:检测Office是否安装以及获取安装 路径 及安装版本View Code 1 #region 检测Office是否安装 2 ///<summary> 3 /// 检测是否安装office 4 ///</summary> 5 ///<param name="office_Version"> 获得并返回安装的office版本</param> 6 ///<returns></returns> 7 public static bool IsInstallOffice(out string off 阅读全文
posted @ 2012-07-11 16:39 xyzla 阅读(2796) 评论(7) 推荐(7) 编辑
摘要:【问题描述】windows.location.href在IE6下停止工作【解决方案】1、<A href=>标签View Code 1 <script type="text/javascript">function goUrl(x){ window.location.href=x;}</script><a href="javascript:;" onclick="javascript:goUrl('http://www.sina.com');">跳转1</a>& 阅读全文
posted @ 2012-07-11 06:57 xyzla 阅读(3546) 评论(2) 推荐(2) 编辑
摘要:问题描述 1、Excel每个工作薄(sheet)生成记录行数 2、asp.net关于导出Excel的一些问题的集锦 3、下载失败,临时文件或其所在磁盘不可写 4、未能加载文件或程序集“Microsoft.Office.Interop.Excel, Version=14.0.0.0,** 5、IIS下 阅读全文
posted @ 2012-07-11 06:54 xyzla 阅读(5842) 评论(7) 推荐(8) 编辑
摘要:InnoSutup打包工具下载不带.netFrameworkView Code 1 ; 脚本用 Inno Setup 脚本向导 生成。 2 ; 查阅文档获取创建 INNO SETUP 脚本文件详细资料! 3 4 [Setup] 5 ; 注意: AppId 的值是唯一识别这个程序的标志。 6 ; 不要在其他程序中使用相同的 AppId 值。 7 ; (在编译器中点击菜单“工具 -> 产生 GUID”可以产生一个新的 GUID) 8 AppId={{E47F55B6-5604-4430-A9BE-AE7ADAB5D08C} 9 AppName=xxxxxxxxxxxxxxxx V1.1.8. 阅读全文
posted @ 2012-06-27 16:26 xyzla 阅读(3451) 评论(3) 推荐(6) 编辑
摘要:.net操作系统文件(ini与dat)的帮助类View Code 1 using System; 2 using System.Text; 3 using System.Runtime.InteropServices; 4 using System.Diagnostics; 5 6 using System.IO; 7 using System.Data; 8 9 /// <summary> 10 /// edit by: 201206.14.1535 11 /// </summary> 12 public class Ini 13 { 14 /// <summ. 阅读全文
posted @ 2012-06-27 10:32 xyzla 阅读(1137) 评论(2) 推荐(2) 编辑
摘要:SQLiteHelper 帮助类 [一]SQLiteHelper 帮助类 [二]SQLiteHelper 帮助类 [三]View Code 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Data.SQLite;// 6 using System.Data;// 7 using System.IO;// 8 using System.Data.Common;// 9 using System.Configu... 阅读全文
posted @ 2012-06-26 12:26 xyzla 阅读(837) 评论(0) 推荐(3) 编辑
摘要:SQLiteHelper 帮助类 [一]SQLiteHelper 帮助类 [二]SQLiteHelper 帮助类 [三]View Code 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Data.SQLite;// 6 using System.Data;// 7 using System.IO;// 8 using System.Data.Common;// 9 using System.Configu... 阅读全文
posted @ 2012-06-26 12:23 xyzla 阅读(875) 评论(0) 推荐(3) 编辑
摘要:SQLiteHelper 帮助类 [一]SQLiteHelper 帮助类 [二]SQLiteHelper 帮助类 [三]View Code 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Data; 6 using System.Data.Common; 7 using System.Data.SQLite; 8 9 namespace Tools.Data 10 { 11 /// <summar... 阅读全文
posted @ 2012-06-26 12:02 xyzla 阅读(2031) 评论(0) 推荐(4) 编辑
摘要:Microsoft.Win32.RegistryKey regKey = Microsoft.Win32.Registry.LocalMachine; Microsoft.Win32.RegistryKey regSubKey = regKey.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winword.exe", false); string OfficePath = Path.GetDirectoryName(regSubKey.GetValue... 阅读全文
posted @ 2012-06-25 08:15 xyzla 阅读(762) 评论(0) 推荐(0) 编辑
摘要:CKEditor+CKFinder配置学习基于dotNetFramework环境,解决方案部署在VS2010 + dotNetFramework4.0【下载源码】富文本编辑器学习,常见富文本编辑器有:CKeditor(FCkeditor)、UEditor(百度推出的)、NicEdit、KindEditor在本系列博文里,着重介绍前两种文本编辑器的使用,边学边学,还望虾米们来此指教!CKEditor及CKFinder下载:CKEditor:ckeditor_aspnet_3.6.2.zipCKFinder:ckfinder_aspnet_2.1.1.zipCKEditor解压缩:CKFinder 阅读全文
posted @ 2012-03-06 00:05 xyzla 阅读(6967) 评论(5) 推荐(8) 编辑