New ASP.NET project gives a great webapp template in Visual Studio 2010

(This post is part of Visual Studio 2010 series)

When you create a new ASP.NET web application in Visual Studio 2010, you are getting a project which has a good set of features built into it for you to get started quickly. In previous versions of Visual Studio, when you create a new ASP.Net project, you just get one .aspx page with a web.config file.

New-ASP.NET-WebAppTemplate

 

(Visual Studio 2010’s solution explorer showing the contents of a just created Web Application project)

Visual Studio 2010’s new project template has the following..

 

  • Master page – with menu, login view control, etc., has good div based layout with nicely used css styles. Along with two files based on master page(Default.aspx & About.aspx).
  • Stylesheet - with styles for most elements your web pages will be designed with, that you can customize as you wish
  • Forms authentication enabled – provides you with .aspx pages which implements forms authentication, like, login, register new user and change password, with necessary configurations in web.config
  • Web.config file with Debug and Release versions, including sample Web.config transformations that you most probably need
  • Web.config readily configured for ASP.NET Membership, Roles & Profiles
  • jQuery library .js files included with three versions of .js files – one with Visual Studio intellisense support, a normal one and a minified one-which is used for production.

 

This new project template would help beginners and people who are yet to get good overview on how a typical ASP.NET web site would be written.

Bookmark / Share

A tip when working with QueryStrings..

We still use QueryStrings for many reasons even though we have other methods to deal with HTTP requests to web applications. And when working with QueryStrings, I hate to type Request.QueryString(“blah”), Request.QueryString(“blahblah”), Request.QueryString(“blahblahblah”), etc., again and again when I need to. This is more tiring if there are more number of QueryString items to deal with.

If you note, Request.QueryString is actually a NameValueCollection. So in suitable situations I would love to use a NameValueCollection object with a short name instead of Request.QueryString(“blah”) ;) as shown below. This saves time and provides a little better coding experience.

NameValueCollection q = Request.QueryString;

Response.Write("name" + q["name"]);
Response.Write("address1" + q["address1"]);
Response.Write("address2" + q["address2"]);
Response.Write("city" + q["city"]);
Response.Write("country" + q["country"]);
Bookmark / Share

Ctrl+Tab.. used like this could improve user experience..

Tabbed browsing..

Perfect feature parity ;)

Current version of all major browsers have Tabbed browsing feature. I’ve noted an issue in this tabbed browsing behavior since I started using a browser that had it. Before telling about the actual issue, I would like to remind you about a well known fantastic feature of Windows OS(I am not sure if any other OS already had it before Windows, Apple?). Any computer geek cannot live without it.

(For those of you who are not aware..you can open a new tab in latest browsers by pressing Ctrl+T and switch between each Tab using Ctrl+Tab, just keep this in mind..)

Alt+Tab... You know how useful it is, it helps to switch between different software applications running on your system easily, people who tend to use mouse less and keyboard more would love it, it’s their first great weapon.

But, have you noted a behaviour of Alt+Tab, if you press & hold Alt key and press Tab continuously you get a list of all running applications and you can choose from it. But if you just press Alt+Tab (and release Alt & Tab), Windows will take you to the previously focused application, and if you press Alt+Tab again(and release both keys) it will take you to the application from where you selected(focused) current application.

This functionality provides you an option to quickly swap between two applications. Especially it’s critical when you are referring content from one window and work in another window, like most developers, designers and any kind of data processing user would do.

So I would like to have the same kind of behaviour in Tab enabled browsers too, isn’t it? But in browsers if I use Ctrl+Tab in both the above mentioned ways I get the same result, it takes to the next tab sequentially. I don’t think providing Alt+Tab like behaviour would complicate the usability to beginners.

As most of you do, I will also spend lot of time doing comparisons and analyse various things, like, compare two mobile phones, gadgets, etc. In these times, I would like to swap as I do in Alt+Tab, it also becomes tedious for me to remember the tab position or locate the tab, if I open many of them as a result of my search and it ends up in a confusion and requires a higher level of concentration. This puts some stress on the user and might get a (slight)feeling similar to doing something in a work environment pressure and the user won’t enjoy the browsing experience ultimately, IMHO.

This issue exists in IE, FireFox, and Google Chrome, don’t know about anyother browsers, let’s see whether they think it should be changed. If you know if there is a browser that works as I wanted above, let me know, I think I will use it for specific browsing needs.

 

Bookmark / Share

Some new features of Visual Studio 2010 that can help your productivity right away

(This post is part of Visual Studio 2010 series)

I am playing with Visual Studio 2010 for some time now and just thought to sum up some of the new features of Visual Studio 2010 that could enhance your productivity right away after you start using it.   more...

Bookmark / Share

Visual Studio 2010 released :)

Finally, Visual Studio 2010 released today(April 12, 2010).

I saw few guys tweeting each other that they are so happy about Visual Studio 2010’s release and this video.

Do you wonder why they are that much happy? and are they maniacs?

I am happy too, reason is, it could help developers by providing cool features which aren’t available till now, which simplifies our job a considerable extent and gives time to apply thought where it is really needed.

 

Happy Programming ! (hopefully soon with Visual Studio 2010 :)

 

Don’t miss the video – When I Build You (The Visual Studio 2010 Song)....

 

Note: I couldn’t get the lyrics clearly and it says something about PHPers, but I think it’s just for fun and no offence intended to PHP developers :)

Bookmark / Share

Visual Studio 2010 new features series

This post will list all the posts related to Visual Studio 2010 in this blog, be it C# 4, visual basic 2010, .net framework 4 or Visual Studio 2010 IDE specific, you can find it here going forward. These posts will include tiny improvements to mega-features introduced in Visual Studio 2010.

 

 

As and when I find cool new features in Visual Studio 2010, I always hoped to write about them. I wish to have extreme time management capabilities, atleast from now… :)

 

(Note: All posts are as per things I said here, so if it suits any of those points, I will write :)

 

Bookmark / Share

What can you do with ‘IntelliTrace’ in Visual Studio 2010

(This post is part of my Visual Studio 2010 series)

As I wrote in my earlier article, Visual Studio 2010 has many new features in debugging. IntelliTrace is one of the major features of Visual Studio 2010 and as of now it is available only in Visual Studio 2010 Ultimate edition. In my opinion, IntelliTrace is the best reason to convince your boss to get Ultimate edition for you :). Note, IntelliTrace only supports managed code, for example, it doesn’t support vc++ native code.   more...

Bookmark / Share

Auto-Implemented properties comes to Visual Basic 2010

(This post is part of my Visual Studio 2010 series)

In C# we can create properties for classes in simple way by just specifying the below code, this option is called auto-implemented property, as the implementation is taken care by the compiler.  more...

Bookmark / Share

New Stream.CopyTo() in .Net framework 4

(This post is part of my Visual Studio 2010 series)

Stream.CopyTo() is a new method added to System.IO.Stream in .Net framework 4, which allows you to copy bytes from one stream to another easily and makes your code simple.  more...

Bookmark / Share

Accessing parent window from child window or vice versa in JavaScript – options explored

[Note: I wrote this article few years back, when I got few hours of free time to explore these; thought of putting it here as it has a set of different techniques which is helpful for someone facing this scenario and could be a reference for me, initially written for beginners/intermediates]

This article explains options available to access the data present in a parent window from a child window or vice versa in JavaScript. By telling the word Parent I mean the browser window that opens another browser window, the new window is what I call Child window.   more...

Bookmark / Share