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

Blog issue…

Recently I was doing some changes in my blog and I just found that there was some problem in few posts in my blog, which is totally not related to the changes I’ve been doing, not sure when this happened, actually images weren’t displayed (in this & this post). If you have read them before just check if you have seen the their images too.

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

What is an RSS feed and how to use it? (especially for developers)

feedlogo Even though RSS is out there for a long time, there are people(even programmers) who still don’t really know what an RSS feed is, even if they know what it is, most of the them don’t really understand how feeds can be helpful for them.

If you ask to some of your friends about..“feed”, “web feed”, “RSS feed” or “ATOM feed”, they may say “I am not sure”, but if you ask them.. “noted an orange icon in the browser’s address bar?” they most probably say “yes”.. everyone notes that.

So I thought of writing a post to introduce feeds(for those who don’t yet know) and the benefits I have noted when using them.

 

What is an RSS feed or ATOM feed or web feed?

It’s a way a website provides updated content which you can read via your feed reader. It’s generally called web feed. RSS stands for Really Simple Syndication, more about RSS here. There is another popular format called ATOM, more here.

 

What is a Feed Reader?

It’s a software or web application you can use to subscribe to the feeds of websites. You can use feed readers to aggregate all of your favorite websites’ feeds in an organized way. Feed readers automatically check the feeds and let you know if any new content is available in the website, you can configure how often you want to do this check. You can read the new content in your feed reader itself.

You can try Feed Demon, Google Reader, etc. Even latest versions of all popular browsers provide options to subscribe to feeds, but I recommend a feed reader application as it could provide more options to manage your feeds, for example, accessing in any PC if it’s a web application(or has online synchronization), categorizing feeds, etc.

 

How to subscribe to a feed?

  • Find the feed url by clicking the feed1 icon in the browser’s address bar or use the icon/link provided by the website itself.
  • You will be taken to the feed, copy the feed url, add in your feed reader by pasting the url

 

Uses of feeds..

  • Basically, using feed readers to subscribe to all your favorite websites/blogs provide you a single organized location where you can update all your feeds and find out which website/blog has new content, instead of visiting each one manually to check for new content.
  • You can use feed readers as a bookmarking application too.
  • Feeds mostly provide abstract of the full content, so you can decide to visit the site only if you want to read more about a particular content.
  • Most feeds including mine nowadays use FeedBurner, which provides more options to the user, like, you can subscribe to the feed via e-mail, to get alerts when new content is posted.
  • Feed readers provide categories which I use to organize feeds and read them based on my mood.
  • Even I don’t prefer feeds some times..when I prefer visiting the website/blog, as its design is good and I like to read with the layout of the website, but still I subscribe to the feed to see if there is new content, then click the heading and visit the actual website/blog to read further.

There is another fact I should say frankly, the author would be happy to see the no. of subscribers to his/her feed, and most websites(including this) would like to showcase their subscribers to promote them, so by subscribing to the feed you can actually support the website or blog too.

That’s it, hope you got some basic idea about web feeds and hope you’ll start using feeds and don’t forget to subscribe to my feed :)

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