IIS URL Rewriting and ASP.NET routing

With the release of URL-rewrite module for IIS 7.0 and the inclusion of ASP.NET routing into the .NET Framework 3.5 SP1, there have been a lot of questions from ASP.NET developers about how these two features relate to each other and when to use each. The intention of this document is to describe the differences between these two technologies and to provide guidance for Web developers on when to use IIS URL rewriting and when to use ASP.NET routing.

From a high-level point of view, it may seem that these technologies provide very similar functionality–both allow your Web applications to have user-friendly and search-engine-friendly URLs. However, there are fundamental differences between these two technologies that are important to understand in order to make the right choice when deciding what to use for your Web application. In order to help you understand those, we will first explain how IIS URL rewriting and ASP.NET routing work.

Read more

About these ads

string to date conversion asp.net

There has been always a Problem in working DateTime variable in ASP.NET when you are working on different environments.

So I feel that why not make some short of solution for that. Here i came up with some result. May be there is better alternative.

Create one common class or if you have in your project than all you need to create is static method to convert string into DateTime with ‘MM/dd/yyyy’ Format.

public static DateTime ParseDateFormatToMMDDYYYY(string oDate)
    {
        IFormatProvider fp = new System.Globalization.CultureInfo("en-US");
        return DateTime.ParseExact(oDate, "MM/dd/yyyy", fp);
    }

Once you have created static method now all you have to do is to use it when ever necessary.

 DateTime search_date = Utilities.ParseDateFormatToMMDDYYYY(Request.QueryString["searchDate"].ToString());

Here the format for Date can be Controlled from Utility Class you can make changes as per your requirement.

Hope this will help !!!

Shout it
kick it on DotNetKicks.com

e-Commerce using ASP.NET MVC Framework

In this two-part series, you will learn how to a typical front end of an e-commerce system using the great Microsoft ASP.NET MVC 1.0 framework.

In the first part, we will focus upon the following points:

  • system design
  • functionality design
  • architecture design and
  • database design etc…

In the second part, we will discuss the detailed coding related things.

Introduction

With the rapid development of Internet, online book sales, as a typical example of the development of Web e-commerce systems, have been deeply mixed up with people’s daily life. Staying at home, people can choose to buy their own favorite variety of books, which greatly shortens the buying time and improves efficiency. Across time and spatial constraints to business circulation, online book sales system has not only brought great changes in commercial circulation, but also brought conveniences to consumers.

Based on the famous MVC design pattern, Microsoft ASP.NET MVC provides a design framework and technical foundation for creating web applications under the .NET platform. It is a lightweight, highly testable framework, which combines the existing excellent ASP.NET characteristics (such as the Master pages, etc.).

It is worth noting that ASP.NET MVC framework has greatly simplified the complex part of programming inside the ASP.NET Web forms solution; and, at the same time, whether the strength or flexibility are concerned, they are not inferior to the latter at all.

In this two-part series, we will construct a client side of an online book sales system using the ASP.NET MVC framework.

Read more

Shout it

kick it on DotNetKicks.com