We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution
Learn MoreTab menus are a fairly common thing that I use in a lot of my applications. I like tabs because they help break up large chunks of, usually, related information.
At work we use RadControls for Telerik and they have a pretty nice tab menu control that is easy to use and looks good too. The only problem with these controls is that they only work in WebForms like even the default ASP.NET controls. So when I started playing with MVC I quickly realized I would need to spend some time building some of these controls myself.
There are a number of articles present on the Internet showing different ways to develop a sitemap. Most of them use a tree view and a sitemap file but the output rendered usually is clumsy, unstructured and not in a table manner.
Here in this article I have made an attempt to display a sitemap using nested DataList and web. Sitemap file.
Have you ever tried using the "Using" statement with a method and not a class?
We all have done the following:
1: using(StreamReader s = new StreamReader(@"c:\Test.txt"))
2: {
3: // Do stuff
4: }
Whether you know it or not, the compiler translates that code to the following:
This one could be easily become one of the Job Interview Questions we publish here at Dev102.com, but I decided to write a “regular” post about this issue because it is an important concept and not a just a puzzle or a brain teaser. Take a look at the following code, can you tell what will the output be?
public class BaseType { public BaseType() { Console.WriteLine("Call base ctor."); DoSomething(); } public virtual void DoSomething() { Console.WriteLine("Base DoSomething"); } } public class DerivedType : BaseType { public DerivedType() { Console.WriteLine("Call derived ctor."); } public override void DoSomething() { Console.WriteLine("Derived DoSomething"); } } public class MainClass { public static void Main() { DerivedType derived = new DerivedType(); Console.ReadLine(); } }
The output of this program is:
Copyright © 2012 Dev102.com
Breeze : Designed by Amit Raz and Nitzan Kupererd