- 浏览: 255693 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (293)
- web (1)
- [随笔分类]项目管理 (30)
- [随笔分类]WCF (14)
- 未分类 (1)
- [随笔分类]Linq (4)
- [随笔分类]C#基础 (24)
- 项目 (1)
- [网站分类]3.非技术区(技术之外的文章,但不要涉及任何政治内容) (8)
- [网站分类]1.首页原创精华.NET区(包含架构设计、设计模式)(对首页文章的要求:原创、高质量、经过认真思考并精心写作) (9)
- [随笔分类]Ubuntu (4)
- ASP.Net (1)
- [网站分类]2..NET新手区(用于发表不合适发表在首页的.NET技术文章,包括小经验、小技巧) (30)
- [随笔分类]ASP.NET MVC (20)
- [随笔分类]ASP.NET (3)
- [随笔分类]程序员厨房 (4)
- [随笔分类]英语学习 (28)
- [网站分类]4.其他技术区 (1)
- [随笔分类]Silverlight (12)
- [随笔分类]CodeSmith (8)
- [随笔分类]其他 (4)
- [随笔分类]Ruby (4)
- [发布至博客园首页] (34)
- [网站分类]其他技术区 (3)
- [随笔分类]Ruby on Rails (2)
- [网站分类].NET新手区 (33)
- [随笔分类]TDD (1)
- [随笔分类]不谈技术 (2)
- [网站分类]非技术区 (7)
最新评论
-
yicone:
You make a mistake when paste t ...
WCF步步为营(一):简单示例 -
jinweijie:
你好,这个实现不错,但是在用了scriptmanager以后就 ...
在服务器端保存ViewState
1: //Namespace reference
2: using System;
3: using System.Resources;
4:
5:
6: #region ReadResourceFile
7: /// <summary>
8: /// method for reading a value from a resource file
9: /// (.resx file)
10: /// </summary>
11: /// <param name="file">file to read from</param>
12: /// <param name="key">key to get the value for</param>
13: /// <returns>a string value</returns>
14: public string ReadResourceValue(string file, string key)
15: {
16: //value for our return value
17: string resourceValue = string.Empty;
18: try
19: {
20: // specify your resource file name
21: string resourceFile = file;
22: // get the path of your file
23: string filePath = System.AppDomain.CurrentDomain.BaseDirectory.ToString();
24: // create a resource manager for reading from
25: //the resx file
26: ResourceManager resourceManager = ResourceManager.CreateFileBasedResourceManager(resourceFile, filePath, null);
27: // retrieve the value of the specified key
28: resourceValue = resourceManager.GetString(key);
29: }
30: catch (Exception ex)
31: {
32: Console.WriteLine(ex.Message);
33: resourceValue = string.Empty;
34: }
35: return resourceValue;
36: }
37: #endregion
发表评论
-
C#拾遗系列(1):委托
2008-06-11 14:43 586一、委托概述 委托具有以下特点: 委托类似于 ... -
C#拾遗系列(2):属性
2008-06-11 14:54 7081. 这里主要演示属性的继承和覆盖 2. 把属性理解为方法 ... -
C#拾遗系列(3):构造函数
2008-06-11 15:19 6151. 主要演示构造函数的继承 声明空 ... -
C#拾遗系列(4):索引器
2008-06-11 15:30 7671. 概述 索引器允许类或结构的实例就像数组一样进行索引。索引 ... -
C#拾遗系列(5):泛型委托
2008-06-14 17:25 586using System; using System.Col ... -
C#拾遗系列(6):迭代器
2008-06-14 23:03 5191. 示例: using System; using Sys ... -
C#拾遗系列(7):自定义属性
2008-06-18 14:52 6411 .描述 属性提供功能强大的方法以将声明信息与 C# 代码( ... -
C#拾遗系列(8):异常
2008-06-19 11:02 595using System; using System.Col ... -
C#拾遗系列(9):继承、接口、扩展方法、分部类、类操作、Ref and Out、可空类型
2008-06-19 15:07 1145本文内容: 继承 Equal示例 结构和类 ... -
MSIL(0):简介
2009-03-04 23:06 852Microsoft Intermediate Language ... -
MSIL(1): Hello World
2009-03-09 22:14 7631. 用记事本编写如下代码 .assembly HelloWo ... -
代码段:ASCII to Unicode
2009-04-17 10:44 7761: private string Co ... -
Get countries from system
2009-05-08 16:02 7951: using System; 2: usi ... -
[tips]: 多线程 ManualResetEvent
2009-05-21 14:23 1339WaitHandle用于实现对共享资源的独占访问,AutoRe ... -
C#拾遗系列(1):委托
2008-06-11 14:43 668一、委托概述 委托具有以下特点: 委托 ... -
C#拾遗系列(2):属性
2008-06-11 14:54 5991. 这里主要演示属性的继承和覆盖 2. 把属性理解为方法 ... -
C#拾遗系列(3):构造函数
2008-06-11 15:19 6291. 主要演示构造函数的继承 ... -
C#拾遗系列(4):索引器
2008-06-11 15:30 5901. 概述 索引器允许类或结构的实例就像数组一样进行索引。索引 ... -
C#拾遗系列(5):泛型委托
2008-06-14 17:25 678using System; using System.Col ... -
C#拾遗系列(6):迭代器
2008-06-14 23:03 7081. 示例: using System; using Sys ...
相关推荐
"Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional steers you through the maze of ASP.NET web programming concepts. You will learn language and theory simultaneously, mastering the core ...
Application Design Tips: What to keep in mind when designing your schema Implementation Tips: Programming applications against MongoDB Optimization Tips: Speeding up your applications Data Safety Tips...
《WPF Tips: Uncheckable radio buttons》一文的可执行程序示例与源代码。 原文网址:http://blog.csdn.net/xinyaping/article/details/7887663 作者:辛亚平 工程文件为Visual Studio 2008 with .Net Framework 3.5...
内容概要:本技术文章介绍了如何在七个步骤内选择适当的 RC 阻尼器值来消除转换器电路中的振铃现象。它解释了振铃的原因并提供了一个简易方法计算所需的电容器 (Csnub) 和电阻器 (Rsnub) 大小来减少过高的电压峰以及...
Beginning through intermediate-level programmers will benefit from the accessible style of C# 5.0 Programmer’s Reference and will have access to its comprehensive range of more advanced topics....
In this first book to provide a hands-on approach to refactoring in C# and ASP.NET, you’ll discover to apply refactoring techniques to manage and modify your code. Plus, you’ll learn how to build a...
Pro LINQ: Language Integrated Query in C# 2010 is all about code. Literally, this book starts with code and ends with code. Most books show the simplest examples of how to use a method, but they so ...
尖端通过伪时比较对单细胞RNAseq数据进行功能评估的途径意义的轨迹推断直接从R和GitHub启动TIPS步骤1:安装R和RStudio 在运行TIPS之前,您将需要安装R和RStudio。请检查CRAN( )以安装R。请检查以获取有关R的信息。...
Fixed : Issue with scrolling and selecting value in iOS in TTMSFMXSpinner Fixed : Issue with escape key not cancelling edit mode in TTMSFMXGrid v1.6.0.1 Fixed : Issue with double databinding ...
Drawing on his unsurpassed C# experience, Wagner addresses everything from types to resource management to dynamic typing to multicore support in the C# language and the .NET framework. Along the way...
使用方法:下载后删除文件名最后的\".zip\"即可得到deb包文件。 博文链接:https://lgn21st.iteye.com/blog/207177
Drawing on his unsurpassed C# experience, Wagner addresses everything from value types to assemblies, exceptions to reflection. Along the way, he shows exactly how to avoid dozens of common C# ...
Within these pages, you’ll find tips for “best practices” and comprehensive discussions of key database and XML principles you need to know in order to be effective with ASP.NET. The book also ...
Within these pages, you’ll find tips for “best practices” and comprehensive discussions of key database and XML principles you need to know in order to be effective with ASP.NET. The book also ...
Within these pages, you’ll find tips for “best practices” and comprehensive discussions of key database and XML principles you need to know in order to be effective with ASP.NET. The book also ...