Learning Curve…

Posts Tagged ‘NET


ASP.NET 4.0 supports built in support for URL Routing. This can make site more user friendly and site content more discoverable by search engines. It is also easy to remember and while bookmarking.

Following example shows URL without using Routing mechanism of ASP.NET 4.0.


After using Routing mechanism of ASP.NET 4.0, above URL becomes as follow.


For mapping above URL to the list of products based on category, we need to map our route using new method MapPageRoute of class Route as shown in following examples.
Application_Start(object sender, EventArgs e)   {
         “product/{prodId}”, “~/products.aspx”);



Lets say , you have added a class with a different namespace folder or project  and then calling this class in your aspx.cs page where you have not added class’s namespace.Notice how you immediately get an error when you type class name because it’s defined in a namespace that is not in scope. You can fix the proble in two ways.

1. You can type Imports class’s namespace if you’re using VB.NET or using class’s namespace; if you’re using C# at the top of the code file.

2.You can click the word class name in your calling page once and then press Ctrl+. (Ctrl+Dot) to bring up a dialog that lets you choose the fix for the problem. Choose the appropriate item and .net will adds the necessary Imports/using statement for you.

Creating a new class from existing class is called as inheritance.
Inheritance can be classified to 5 types.

  1. Single Inheritance
  2. Hierarchical Inheritance
  3. Multi Level Inheritance
  4. Hybrid Inheritance
  5. Multiple Inheritance

1. Single Inheritance

when a single derived class is created from a single base class then the inheritance is called as single inheritance.

Single level Inheritance

2. Hierarchical Inheritance

when more than one derived class are created from a single base class, then that inheritance is called as hierarchical inheritance.

Hierarical Inheritance

3. Multi Level Inheritance

when a derived class is created from another derived class, then that inheritance is called as multi level inheritance.

Multi level Inheritance

4. Hybrid Inheritance

Any combination of single, hierarchical and multi level inheritances is called as hybrid inheritance.

Hybrid inheritance in C#

5. Multiple Inheritance

when a derived class is created from more than one base class then that inheritance is called as multiple inheritance. But multiple inheritance is not supported by .net using classes and can be done using interfaces.

Multiple inheritance in C#

Handling the complexity that causes due to multiple inheritance is very complex. Hence it was not supported in dotnet with class and it can be done with interfaces.

WCF (Indigo was the code name for WCF) is a unification of .NET framework communication technologies. WCF is a unification technology, which unites the following technologies:-
• NET remoting
• Web services
• COM+.

The new ClientIDMode property lets you specify more precisely how the client ID is generated for controls. You can set the ClientIDMode property for any control, including for the page. Possible settings are the following:
This is equivalent to the algorithm for generating ClientID property values that was used in earlier versions of ASP.NET.

This specifies that the ClientID value will be the same as the ID without concatenating the IDs of parent naming containers. This can be useful in Web user controls. Because a Web user control can be located on different pages and in different container controls, it can be difficult to write client script for controls that use the AutoID algorithm because you cannot predict what the ID values will be.

This option is primarily for use in data controls that use repeating templates. It concatenates the ID properties of the control’s naming containers, but generated ClientID values do not contain strings like “ctlxxx”. This setting works in conjunction with the ClientIDRowSuffix property of the control. You set the ClientIDRowSuffix property to the name of a data field, and the value of that field is used as the suffix for the generated ClientID value. Typically you would use the primary key of a data record as the ClientIDRowSuffix value.

This setting is the default behavior for controls; it specifies that a control’s ID generation is the same as its parent.

In ASP.NET 4 FormView and on a few of the Login controls having RenderOuterTable property . When you set this property to True (it defaults to False so you need to set it explicitly) the control doesn’t generate a wrapping HTML <table> element. This in turn results in less code and cleaner HTML.

 Question: What is purpose of Assembly Linker or define SDK Tool in .NET Framework?
Answer: In .NET whole the working should be with the helps of DLLs.So all of Visual Studio .Net compilers gernate assemblies or u can say dll.If we want to create an assembly with manifest of a module.We can also put this assembly in seprate file.This AL tol gernate a file with an assembly manifest from modules or resources fles.The syntax of using Al.exe is
                  al [sources] [options]
This tool helps in creating multi-file assembly outside Visual Studio .Net .This multi file can contain modules that are written in different language in one application.


Learning days (Calendar)

July 2018
« Jun    

Knowledge Bank (Archives)

I am on Twitter

Blog Stats

  • 549,136 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other followers

%d bloggers like this: