A little less cared ASP.NET’s NestedMasterPage

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. I have seen developers using user controls which will show and hide sections of site content based on the state of the web site. This is fine for some extent, you know when it becomes bad ? It becomes bad when only user controls are used even for site layout related stuff. ASP.NET’s NestedMasterPage is a great thing, that, I should admit, I myself started using only recently earlier I was using other ways to display a set of pages in different layout in a website. NestedMasterPage is a master page which is based on another master page, you can have as many levels of nesting as you wish, as far as you don’t confuse yourself. You create a NestedMasterPage based on which other normal ASP.NET pages will be created. You can have a Main master page in which a website’s most common UI elements are present and create NestedMasterPages for different areas of a site like subsections of a site like web interface for post Member login, etc. Below is a simple depiction of what could be done with a NestedMasterPage in ASP.NET web

Do you know Notepad’s .LOG feature?

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. Thought of posting a simple feature of notepad that might be useful for many who log things in a file for various purposes, mostly this can be used for simple things that needs to be logged. In Notepad, type “.LOG” (case sensitive) in first line of the file and save it, now close and reopen the file, current date and time will be inserted in the last line and you can type information and save.

Code Snippets in Visual Studio

This post gives introduces code snippets in Visual Studio, how you can use them and helps you find out the list of built-in code snippets for each language easily. Code snippets in Visual Studio are useful in reducing typing effort required to input code. Code Snippets help in several ways to simplify your work if you can remember to use them instead of typing the actual code. Code Snippets are present in Visual Studio from ver 2005.

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

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. (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.   (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

A tip when working with QueryStrings

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. 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”]);

Blog issue…

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. 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 their images too.

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

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. (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] Even though there are more new features in Visual Studio 2010 that can increase productivity, this post focuses on new features that can help productivity immediately, features that will be used by majority of developers frequently/day-to-day basis, than things that are helpful but not used every day(for instance, web.config transformations is not included).   Navigate To… You can use Navigate To(Ctrl + ,) to search specific methods, class’, etc in your code. This helps navigating your code faster, code navigation speed in Visual Studio 2010 is increased highly because of this new feature. This also comes handy when you keep jumping between different methods of your code frequently. In previous versions of Visual Studio you didn’t have such a swift option. You can do more cool things using Navigate To, like, you can type the abbreviation of

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

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. Update: Google Reader is in the process of discontinuation, I use digg’s feed reader these days. 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

Visual Studio 2010 released :)

(Note: This blog post was originally published under my old domain(codesmiles.com), here. Web Archive link. 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 🙂