Archive for the ".NET" category

 

Understanding Date, Time and Time Zone

 
Overview It is important for Developers to understand the concept of Date, Time and Time Zone. Especially when making applications that support localization (it is not just multi languages). When looking for materials on this topics, I come across a great articles at www.odi.ch. And I would like to summarize on what I [...]

Continue reading

 
 

Tech Days 2009 – MOSS 2010 development with VS 2010

 
Overview I went to Microsoft Tech Days HK 2009 yesterday, and attended the session about new features in MOSS 2010 development with VS 2010. According to the presenter (and my understanding ), VS 2010 makes MOSS 2010 development much more easy and enjoyable by the following new features: [...]

Continue reading

 
 

Introduction to ASP.NET Forms Authentication

 
In ASP.NET, forms authentication means that users authenticate themselves using a Web form. This feature is provided by the HTTP module FormsAuthenticationModule. Setting up forms authentication in ASP.NET is quite simple and is presented in a post at WindowsDevCenter.com. Reference ASP.NET Forms Authentication – Part 1 [...]

Continue reading

 
 

ASP.NET User Control – Part 1

 
Overview User Control is quite useful in creating a customized control which can be reused throughout pages. Instead of creating a custom server control, developers can create user control which (in my opinion) is easier to create and modify the control layout. In this part, I will talk about how to create a [...]

Continue reading

 
 

Client side validation skipped if submit Button have "onClientClick" JavaScript function

 
Overview I have a form using ASP.NET validation controls, I have been using these ASP.NET validators for quite a time and they behaved well. However the problem come when I added a "onClientClick" event handler to the form submit button, and then the validation is just skipped and the form post back every time. [...]

Continue reading

 
 

Add a select / deselect all checkbox to an ASP.NET checkbox list control

 
Overview The code below demonstrate how to use JavaScript to get all the checkbox elements of a particular checkbox list, and then check / unchecked them base on the status of another checkbox (the sender). This technique is also useful when you want to do other operation (e.g. ensure single selection) to all [...]

Continue reading

 
 

Restrict date range in Calendar

 
Overview By default, Calendar control won’t allow you to restrict the selectable date range. However, we can achieve this by doing two things: Restrict user from navigating to a month outside the range Restrict user from selecting a day outside the range Reference [...]

Continue reading

 
 

ListView Control vs Repeater Control

 
Overview Repeater control is one of my favorite ASP.NET controls because of its flexibility in UI design. However it lack some useful functions like "Sorting", "Paging" & "Data modification". Now in ASP.NET 3.5 we have a ListView control which seems to do all of the Repeater’s jobs and more. Below are some article [...]

Continue reading

 
 

Understanding ASP.NET Page Life Cycle and TRULY understanding ViewState

 
Overview I once thought that writing an ASP.NET page is like writing a Form in a Desktop Application, all I have to take care are just about event handlers likes "Page_Load", "Button_Click". There is no concept of persisting states in page or controls in my mind ( I am just a Noob…) Actually [...]

Continue reading

 
 

ASP.NET CAPTCHA implementation with C#

 
Overview CAPTCHA stands for "completely automated public Turing test to tell computers and humans apart." It is used to distinguish human end users from machines (including software). This implementation is posted on CodeProject by BrainJar. A zip files containing the source code is attached with the post too. Reference CAPTCHA [...]

Continue reading