Showing posts with label website developer. Show all posts
Showing posts with label website developer. Show all posts

Friday, June 10, 2011

URL Routing in ASP-NET 4 Web Forms


We have experienced this scenario in our daily browsing routine where URL takes a smarter look that can easily be remembered, look simple and yes SEO friendly. This technique is referred as URL-Rewriting in general. So what is URL Routing?

This is a term coined my Microsoft Web development team and was first introduced with ASP.NET 3.5 SP1, where MVC took advantage of routing. Now with framework 4.0 we can leverage this handy tool in web form situations.

There is hardly any difference in URL routing and rewriting in terms of results. Rewriting previously was done through third party dlls and sort of un-managed code (not handled by ASP.NET engine itself).

Making things happen in ASP.NEt 4.0 is super easy, you just have to make some additions in Global.asax file and you are done.

1. Call a function from Application_Start void Application_Start (object sender, EventArgs e)
// Code that runs on application startup
RegisterRoutes(RouteTable.Routes);
2. Create a method and add routes as required void RegisterRoutes(RouteCollection routes)
{routes.Add(new Route("{resource}.axd/{*pathInfo}", new StopRoutingHandler())); // line 1
routes.MapPageRoute ("category-route",
"{name}", "~/gamecategory.aspx"); // line 2
Line 2 is the main thing that adds a route and handles the incoming request for a URL that may be like http://www.yoursite.com/new
First parameter is the friendly name of route that can be used later for getting the outgoing URL and second parameter defines the URL format to match. The third parameter defines the actual page that will handle the request in the background. The MapPageRoute () method has five overloads that can be used for having fine control for features like "Route constraints" and provide "Default values for parameters".
Now in the gamecategory.aspx page you can get the name of category passed and load that category's information on the page. So now in you PageLoad you can take advantage of a new property Page.RouteData to get the "category" value mapped using "{name}"
protected void Page_Load (object sender, EventArgs e)
if (!IsPostBack) string _categoryName = Page.RouteData.Values["name"] as string;
LoadCategory(_categoryName);
Besides getting the parameter value from code you can also use the declarative syntax to get the value in your SqlDataSource by using the new control like
Line 1 is for handling the AJAX implementation with routing as the routing breaks the AJAX resulting in "Sys is undefined or AJAX framework failed to load" error messages. Add this first up as priority is important.
My name is Emad and I develop web and software applications that help people leverage their work and and effectiveness. I love and live in this world and always looking for opportunities to collaborate and sharing ideas. I work as a software engineer and write on various day to day programming practices at My Blog.
View the original article here

Benefits of Hiring VB Dot Net Developers From Offshore Web Development Companies

VB.Net or Visual Basic.Net is an object-oriented computer programming language which is highly used by web programmers to develop web application over the .NET framework. Introduced by Microsoft, this programming language is a powerful tool for developing programs using .NET technology. Today, millions of programmers use VB.net for developing web and desktop based applications. By using this computer language, web programmers can easily develop applications for wireless, internet-enabled handheld devices such as mobile phones.
Till date, about four versions of Visual Basic.Net have been introduced by the Microsoft. And, understanding the technical aspects of these versions is not an easy task. In order to develop web-based applications over VB.Net platform, the web programmers should have thorough knowledge about ASP and C# computer languages.
If you want to develop web applications using VB.Net platform for your website, then it is necessary to hire VB.Net developers from reliable web application development companies. Some offshore web development companies in India have pool of experienced developers to deliver web-based solutions on the .NET framework. The dedicated web developers have the ability to meet the business requirements of their clients in least possible time.
Some of the major advantages of hiring VB.Net developers from offshore web development companies are mentioned below:
• They are expert in developing web applications based on visual basic for different domains and verticals.
• Offshore web developers use their technical, analytical and creative skills to offer quality web-based solutions to their clients.
• Offshore companies have team of programmers that are well trained in many technological aspects of visual basic development. By hiring them for your project, you can minimize the administration cost required to hire a full-time professional.
• The projects are not only delivered on time but are also cost-effective.
• Clients can have direct communication with the professional web developers via telephone calls, e-mails, video chats etc to specify their requirements as and when required.
• Offshore web developers provide regular working status on the assigned projects and help their clients to monitor the status progress of the project.
VB.Net programming language has been developed with improved visual designers, increased application performance and a powerful integrated development environment (IDE). It includes productive features for developing robust web applications easily and quickly. This computer language provides full support for database programming and help programmers to develop games, websites, business applications and many more products.
Are you in need of qualified and experienced visual basic.net developers? Then, opt for hiring developers from reliable offshore web development companies. They will fulfill your technological needs and will provide bug-free web applications according to your business requirements and budget.

View the original article here
Web Statistics