Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes. January 2008 Entries
Url Rewriting Using ASP.NET MVC Framework
Few days ago I wrote a post about Url Rewriting Using RewritePath Method. The basic idea was to rewrite the path to the correct one inside the Application_BeginRequestPath method. This worked out okay but the string manupilation was a bit ugly. ASP.NET MVC Framework gives you the complete control over the URL's. So, you can easily change the URL to anything you like. Let's say I have a url like the following: Articles/[id] and I like to to display the URL like this: Articles/[id]_[title of the article] ......

Posted On Wednesday, January 30, 2008 10:42 AM

Article Published: Getting Started with the ASP.NET MVC Framework

I just published an article "Getting Started with the ASP.NET MVC Framework". The article explains the MVC framework using a real world scenario. I am sure you will like the article.

Posted On Wednesday, January 30, 2008 7:57 AM

Getting Started with ASP.NET MVC Framework
Today, I played around with the new ASP.NET MVC Framework. I have to admit it is quite intriguing. I created a small application in which the user can select a particular category and view all the articles related to that category. When the user clicks on a particular article the application redirect the user to the appropriate article. The first thing is to create a CategoriesController which managers the categories. Here is the implementation. public class CategoriesController : Controller { [ControllerAction] ......

Posted On Tuesday, January 29, 2008 1:03 PM

Url Rewriting Using RewritePath Method
Jeff Prosise wrote a very interesting article in which he demonstrated how to rewrite URL using RewritePath method. In this post I will be using the same method to rewrite the article URLS. Good URL names can result in more traffic to the website since the URL's are index by the search engines. Let's say your website has the following Url: http://www.mywebsite.com/Ar... Although it works and performs the required option but it is very hard for the search engines to index the page ......

Posted On Friday, January 25, 2008 8:34 AM

Using Multiple Databases with the Dynamic Website Project
Dynamic Website Project allows you to create customizable support pages. This can be really helpful if part of your job is to create boring support pages. Recently, I had to create few support pages so I thought why not try the Dynamic Website Project. So, I added the LINQ to SQL as the data source and used one of the databases to create the support pages. In our application whenever a row in the database is updated we update the DateModified field. This can easily be performed inside the GridView_RowUpdating ......

Posted On Thursday, January 24, 2008 12:25 PM

Unit Testing ASP.NET Model View Controller Application
The ASP.NET Model View Controller application allows you divide your application into layers. This division can result in better testing and clean reusable components. Let's see a very simple application using MVC project which involves unit testing. The application consists of a controller named "ProductController". public class ProductController : Controller { private NorthwindDataContext northwind; public ProductController() { } [ControllerAction] public void Index() { RenderView("Index"); } [ControllerAction] ......

Posted On Wednesday, January 23, 2008 1:25 PM

Geekswithblogs Get Together at MVP Conference 2008

Few days ago I blogged about "Who's Coming at MVP Conference 2008?" Brian Scarbeau suggested a very good idea about getting all the geeks of "Geekswithblogs" together. I think it is a great idea to get to know everyone on this blog website.

What do you people think?

Posted On Monday, January 21, 2008 3:24 PM

Podcast: Unit Testing ASP.NET Pages
I just published a new podcast on www.GridViewGuy and www.KoffeeKoder.com. In the podcast I discuss how to unit test your ASP.NET pages using different frameworks including NUnitASP, Watir and WatiN. Check out the link below: Unit Testing ASP.NET Pages I am facing some problems while downloading the podcast. I currently use MediaMax which only allows 5GB download per month. If you are aware of a better and more reliable online FREE storage then please let me know ......

Posted On Monday, January 21, 2008 3:15 PM

Finger Printing Application and Unit Testing
At my job I am currently working on a Finger Printing application which will authenticate users using their finger prints. I decided to write some unit tests for the application but I did not wanted to scan my finger for every test. So, I scanned my finger once and created a fake finger print and saved it in the binary file. Now, I added the binary file to my test project and every time I needed to get the finger print I simply read the binary file. The problem using the binary file was that if I ......

Posted On Friday, January 18, 2008 4:44 AM

MVP Summit 2008! Who's Coming!

Are you Microsoft MVP 2008 and planning to attend the MVP Conference 2008 from April 14th to April 18th. If so, then post a comment. I will be attending the conference and would love to meet fellow MVP's.

:)

Posted On Wednesday, January 16, 2008 7:44 AM

Nintendo Wii and Cool Stuff!
I bought Nintendo Wii more than a year ago. Not being a very big gamer I was bored with it in a couple of days. Recently, I learned that you can browse the Internet using your Wii Internet Channel. The Wii Internet Channel was free if downloaded before June 2007. In my case I had to pay 500 points which is equivalent to $5 to purchase the Internet Channel. I must admit the Internet Channel is pretty awesome. I can use the Wii browser to browse to any website I want. I can even go to YouTube and watch ......

Posted On Saturday, January 12, 2008 6:05 AM

"SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM."
While working on an application I faced the following error when trying to submit changes to the database using DLINQ: exception = "SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM." So, from the exception it seems like my date is initialized to a wrong state. By, the way I put the default value for my date to be GETDATE() in the database and while inserting I was not setting the date property namely "DateCreated" and "DateModified". So, in order for the submit ......

Posted On Thursday, January 10, 2008 11:19 AM

Video: Implementing DropDownList Dependency Inside the GridView Control

 In this video I will demonstrate how to create DropDownList dependency. The DropDownLists will be contained inside the GridView control. You can check out the video using the following link:

Implementing DropDownList Dependency Inside the GridView Control

 

Enjoy!

Posted On Tuesday, January 8, 2008 4:42 PM

Over 50 Videos on GridViewGuy! :)
Some of you might now know but there are over 50 videos hosted on GridViewGuy. The videos target the different technologies associated with the .NET framework. The videos are in different formats i.e some are WMV files, Flash files and downloadable files. I hope you enjoy these videos and if you have a good idea for a new video then comment on this post and I will try my best to create that video :) GridView Parent-Child Relationship Using Ajax & JQuery GridView Edit, Update, Cancel and Delete ......

Posted On Tuesday, January 8, 2008 4:47 AM

Upcoming Videos on AspAlliance!
I have been working on some new videos for AspAlliance which will be posted on the website on weekly basis. Here are some of the upcoming and new videos: 1) Introduction to the Dynamic Website Project 2) Unit Testing ASP.NET Pages Using WatiN 3) Unit Testing ASP.NET Pages Using Watir 4) Introduction to the ASP.NET MVC Framework 5) Implementing MVP Framework for ASP.NET Application You can find the complete list of videos at www.aspalliance.com/videos Enjoy ......

Posted On Tuesday, January 8, 2008 4:39 AM

Article Published: Unit Testing ASP.NET Pages Using WatiN

I just published an article "Unit Testing ASP.NET Pages Using WatiN". You can view the article at www.KoffeeKoder.com website. I hope you enjoy the article!

Posted On Monday, January 7, 2008 7:54 AM

Starting WebDev Server Programmatically to Unit Test ASP.NET Pages
Yesterday, I was using WatiN to test some of my ASP.NET pages. I started by writing unit tests for the already created pages. I tried to run the unit tests but they froze. This was because the WebDev server (ASP.NET internal web server) was not running. The easy way is to start the server manually by running some command line tools or by running the ASP.NET application. But, this was not a good solution. So, I decided to start the WebDev server programmatically from the unit test project. I set up ......

Posted On Monday, January 7, 2008 5:33 AM

Someone Really Loves Java! :)
More than a week ago I started a poll in which I asked "What language would you prefer to learn in the year 2008?". And here are the results: What language would you prefer to learn in the year 2008? Ruby 22 C# 60 VB.NET 10 Java 82 Python 8 F# 27 Erlang 1 C++ 6 From the poll result it seems that Java is will be the primary language for many people in the year 2008. Unfortunately, I have to disqualify Java from this poll. This is because some Java lover voted continusly. You may ask how do I know! ......

Posted On Sunday, January 6, 2008 10:33 AM

Tons of Videos on AspAlliance

There are tons of videos covering different aspects of the .NET techology hosted on www.aspalliance.com. As, of today (01/05/2008) there are 81 videos. Now, that's a lot!

I highly encourage everyone to check out the videos. And I am sure you will find them informative.

www.aspalliance.com/videos

Posted On Saturday, January 5, 2008 5:12 PM

Session.Timeout and Notification Before Session Expire
Session.Timeout means that after how much time the user's session will expire and the user will not be able to access the items in the Session object. By default the Session.Timeout is 20 minutes. You can change this through the web.config or the page level code. Let's see a small example: Session.Timeout = 1; Session["Name"] = "Mohammad Azam"; In the above code I am setting the Session.Timeout to "1" minute. After that I put "Mohammad Azam" in the Session object. This means that if you don't make ......

Posted On Saturday, January 5, 2008 6:21 AM

Unit Testing Validations Controls on ASP.NET Page Using WatiN
I have been playing around with WatiN and quite frankly I think it is an awesome product. Today, I need to test if the validation controls are working properly or not so I used WatiN to write simple unit tests. The thing about validation controls is that they are displayed with the page with everything intact but are not visible. Here is the RequiredFieldValidation control HTML. <span id="rfvName" style="color:Red;visibility... is required</span> The interesting thing is visibility:hidden ......

Posted On Thursday, January 3, 2008 9:53 AM

Unit Testing ASP.NET Pages Using WatiN
Thanks to Justin and Jason for pointing out WatiN. WatiN is inspired by Watir but build for the .NET framework. This means you can write your unit tests using C#, VB or any CLS complaint language. I used WatiN with MbUnit and it worked super great! Let's check out some of the code below: You need to add reference to MbUnit.Framework and WatiN.Core. [TestFixture(ApartmentState... public class TestLoginPage { [Test] public void TestCanAuthenticatedUserLog... { IE ie = ......

Posted On Wednesday, January 2, 2008 5:10 PM

Testing ASP.NET Application Using Watir And Ruby
Now, this is freaking awesome. Testing your ASP.NET pages using Ruby code. I used to test my ASP.NET pages using NUnitASP which was pretty decent. But, I am not sure what happened after I installed VS 2008 the NUnitASP simply stopped working. Anyway, I needed a tool to test my ASP.NET pages. These pages typically include DropDownList, TextBoxes, Checkboxes and stuff. If you had to test them manually then it would take you a long time plus it is really boring. So, I came across this interesting post ......

Posted On Wednesday, January 2, 2008 9:27 AM

User Interface Messages and Strongly Typed Messages
Some time back I wrote an article about how to store and retrieve the user interface messages. When I say user interface messages I meant the messages we display on the screen to notify the user of some operation. These messages can be "Account has been created!", "Details have been updated" and so on. You can view the article here. One problem with the above approach was the weak typing. This means that if I had to display a login successful message I had to send the string "LoginSuccessfull" to ......

Posted On Tuesday, January 1, 2008 4:34 PM

MVP++

The year 2008 starts off on the right foot as I got my MVP again for this year. Thanks everyone!

Posted On Tuesday, January 1, 2008 1:00 PM

Random Expectations and Unit Testing
When we unit test we make sure that the result is correct by comparing it to our expectations. But what if the result of the method or module is random? How do we unit test that module? Recently, I had to unit test a method which returned random output (strings). And I had to test that the method indeed returns a random output (string). Here is the method: [Test] public void TestCanGetRandomMessage() { string message = String.Empty; bool isRandom = false; for (int i = 0; i <= 5; i++) { int randomNumber ......

Posted On Tuesday, January 1, 2008 9:40 AM

Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net