DefaultDotAspx.com Is Launched…
DefaultDotAspx.com said “Hello world!” to the ASP.NET community.
What is it?
You can use DefaultDotAspx.com to get ready for the interviews or evaluate your knowledge. It is kind of a small knowledge base about ASP.NET and other topics. It has some short quizzes about ASP.NET and SQL as well.
There are tons of sites like this. So what?
Well… It is developed with the perspective of an ASP.NET development experience, therefore the content is dedicated accordingly. Even though it does not matter to the end-users, it was - and is being - developed by the latest version 3.5 and its new features.
Enhancing Paging in ListView by Using DataPager
DataPager is one of the new controls in ASP.NET 3.5, and it provides paging functionality for data-bound controls that implement the IPageableItemContainer interface, which is only the ListView control for the time being.
By default, DataPager has two commonly used paging styles:
• Numeric Pager via NumericPagerField
• Next and Previous Pager via NextPreviousPagerField
To get an idea about how to implement these basic common styles, you can read this post.
This post will explain how to enhance the paging experience in a ListView by using both a NextPreviousPagerField and a DropDownList which will enable users to select the page size of ListView. This page size is actually the PageSize property of the DataPager, and this property defines the number of records that are displayed for each page of ListView.
To avoid complexity, the following simple XML file (Contacts.xml) will be used as a data source:

And, the XMLDataSource that consumes this XML file is:

“xdsDemo” is the DataSourceID of the ListView “lvDemo”:

After getting this data binding done, LayoutTemplate of “lvDemo” should be similar to the following:

Even though it is not completely related with the topic and emphasis of this post, ItemTemplate and AltenatingItemTemplate templates of “lvDemo” are:

Finally, here is the code that sets DropDownList (ddlDemo) and DataPager (dpDemo):

As a conclusion of all these things, the result on the browser should be like:

Download
Sample code for this demo application can be downloaded via here.
Update Title and Meta Tags Dynamically in ASP.NET
If you are using master pages, updating your title or meta tags (such as “description” and “keywords”) may become an important subject because of the SEO purposes. Since there are several ways to accomplish this, here is my way in C# to do so.

How to Fix Audible Alert Issue with The Reminder in WM 6.0
I have been enjoying my HTC S620 for the last couple of months, but there has been a small problem with my audible alerts when I set an appointment in my mobile calendar. The reminder has been just vibrating, not playing a sound even though I have set the right things for my “Normal” profile to get an audible alert. After a short googling, it turned out to be a bug in Windows Mobile 6.0 (maybe for 5.0 as well).
Thanks to Karl Gechlik that this small but important bug has a fix in this link. He simply explains a workaround about altering the XML file of the profile in order to solve the problem. It seems to be working for me at this time.
Rotate Array by N Position - Via Programming Pearls
Lately, I have been trying to finish reading the Programming Pearls written by John Bentley. The chapters related with designing and developing algorithms are really entertaining. One of the questions that was discussed in the early chapters of the book was about an algorithm of rotating a one-dimensional vector, and I want to share my solution written in VB.NET and C# by utilizing a simple string array.
Question (with the terms of an array)
Rotate a one-dimensional array of K elements from left by N positions.
For instance, with K=7 and N=3, the array {a, b, c, d, e, f, g} is rotated to {d, e, f, g, a, b, c}.
Solution
As suggested in the book, I will be using the Array.Reverse method. I will also write the function that rotates an array from right as well in order to carry out the discussion further.
In VB.NET - Rotate By N From Left

In C# - Rotate By N From Left

In VB.NET - Rotate By N From Right

In C# - Rotate By N From Right

Page_Load of an ASP.NET environment would be a good place to test and visualize the results in this case.
In VB.NET

In C#

Finally, results on the browser should be like:
