2011年8月15日

Building a Simple DataGrid in Silverlight 4.0

摘要: Let's run through a simple DataGrid example.1. create a new silverlight applicaiton in VS 2010. Name the project SimpledataGrid, and have VS create a web application porject for you.2. Add the DataGrid to your application. To do this, simply add the DataGrid to the root Grid in your XAML, and se 阅读全文

posted @ 2011-08-15 13:23 cjerych 阅读(307) 评论(0) 推荐(0) 编辑

Element to Element Binding

摘要: To help explain element to element binding in Silverlight, let's build a very simple application. The application will include a buttona a checkbox. When the checkbox is checked, the button is enabled, when the checkbox is unchecked. the button is disabled. Let's get started.1. Create a silv 阅读全文

posted @ 2011-08-15 11:43 cjerych 阅读(224) 评论(0) 推荐(0) 编辑

Simple Data Binding in Silverlight 4.0

摘要: To help explain data binding in Silverlight, let's build a very simple application. The application will include a Book object that contains two properties: Title and ISBN. These properties will be bound to two Text Controls. Results as following:1. Create a new Silverlight application in Visual 阅读全文

posted @ 2011-08-15 11:31 cjerych 阅读(311) 评论(0) 推荐(0) 编辑

Data Binding in Silverlight 4.0

摘要: Data Binding in SilverlightData binding in Silverlight is accomplished by using the Binding class. The Binding class has two components--the source and the target--and a property that defines the way the two are bound, called the binding mode. The source is the data that is to be bound, the target i 阅读全文

posted @ 2011-08-15 09:51 cjerych 阅读(216) 评论(0) 推荐(0) 编辑

2011年8月14日

C#面试题汇总

摘要: 以下列出的所有题目是从网上找的,也有自己修改的地方。1. 如果理解装箱、拆箱操作?运用此操作时对系统性能有什么影响?装箱:从值类型转换为引用类型拆箱:从引用类型转换为值类型创建引用类型会比创建值类型对象的系统开销要大得多,因为它在堆上创建了对象,消耗了内存。而值类型却只是把值放在了线程堆栈上,所以运用此操作时,对系统性能没什么影响。2. XML中的XmlDocument跟XmlReader有什么区别?XmlDocument用于读取、操作和修改XmL文档。XmlReader类也读取XML,但它提供非缓存的只进、只读访问。这意味着使用XmlReader无法编辑属性值或元素内容,或无法插入和移除节点 阅读全文

posted @ 2011-08-14 22:02 cjerych 阅读(1058) 评论(0) 推荐(1) 编辑

Session跟Cookie有什么关系?假如IE禁止使用Cookie,那Session还有用吗?

摘要: 最近上网搜索了一下面试中可能遇到的一些问题,正好遇到这个,之前也没做过,从网上找了个答案:Session(会话状态)它是asp.net的内置对象,在服务器端存有用户的个人信息,用来唯一表示一名用户。当用户登录服务器的时候,系统会自动合建一个Session,它可暂存用户的首选项如登陆名,时间,状态以及其它实时信息(如购物车信息)。当Session到期或你关闭浏览器,服务器将终止Session。Cookie(网上信息数据块)它是asp.net内置对象request和response中的集合。它在在于你机器上的一个文件夹里,每个有唯一的名字标识。是服务器用于跟踪用户信息、存储用户信息的文件。它可含有 阅读全文

posted @ 2011-08-14 17:47 cjerych 阅读(2344) 评论(1) 推荐(0) 编辑

2011年8月12日

C#String.PadLeft函数,文本对齐以及填补解决方案

摘要: 由于很多时候我们需要把数据进行格式化,方便各个系统之间通信和数据交互,因此难免会经常让人位数不够而进行位数相应数据填充。比如,你希望获取的是7位的2进制数据格式,而2进制数据格式,都是以0,1都为数据信号的,只有1,0两数据格式,刚我说的是7位,相当于如下:1000101格式,如果,我的数据是101三个长度的2进制数据,但我想返回一个新的并且具有固定长度,位数不够填充0的做法。string SourceStr="101";string DestinationStr;DestinationStr=String.PadLeft(7,"0");Console. 阅读全文

posted @ 2011-08-12 14:53 cjerych 阅读(416) 评论(0) 推荐(0) 编辑

Working with the RadioButton and CheclBox controls

摘要: The Follow exercise will give you a first look at eh RadioButton and CheckBox controls. You will build a simple survey.1. create a new silverlight application in visual studio and call it CheckBoxRadioButton. allow visual sutdio to create a web application project to host the application.2. in the m 阅读全文

posted @ 2011-08-12 14:51 cjerych 阅读(314) 评论(0) 推荐(0) 编辑

Working with the TextBox Control In Silverlight 4.0

摘要: This exercise demostrates the use of the TextBox control in Silverlight by creating a simple application that will request the red,green,and blue values to fill an ellipse with a given color. The resulting application will appear as shown below.Here is the codes.1. In Visual Studio, create a new Sil 阅读全文

posted @ 2011-08-12 14:00 cjerych 阅读(237) 评论(0) 推荐(1) 编辑

2011年8月11日

EXCEL数据导入SQL Server数据库中

摘要: 最近测试一个程序,将EXCEL数据(65535行,4列[ModelName,ModelNumber,ModelCost,ModelProductivity])导入到数据库表中(3列[aa,bb,cc]),为了解决时间问题,采用了.Net Framework中的SqlBulkCopy类,经过最后测试,执行操作需要8秒左右即可完成,当然测试的数据是比较简单的。代码如下:private void button1_Click(object sender, EventArgs e) { string connString = "Data Source=XXXX; Initial Catalog 阅读全文

posted @ 2011-08-11 13:37 cjerych 阅读(250) 评论(0) 推荐(0) 编辑

导航