Category Archives: Asp.Net

Asp.Net

How to host a window service using installUtil.exe.

Steps to host window service using installUtil.exe Go to installUtil.exe path C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe Build Application in Release mode. Open VS2012 x86/64 Native Tool Command with Run as Administrator cd (Copy+Paste InstallUtil.exe path) Enter Application Path Enter

How to fetch html from a URL in c#.

Fetching a html from an URL is easy. Class System.Net.HttpWebRequest provides an HTTP – specific implementation of the System.Net.WebRequest class.

IIS Integrated vs Classic Mode

Integrated mode and Classic mode are parts of IIS Pipeline mode. IIS Pipeline mode refers to how a web server processes client requests. Integrated Mode It works as a part of IIS 7. It is only available in IIS 7 and above. It handles all requests through a unified pipeline because of the integration of ASP.NET’s runtime with Continue Reading…

What are Hashtable and Dictionary in C#?

Hashtable it is not generic type because key and value are not declared with datatypes. It is slower because it needs to convert value while getting data from hashtable. Return null when requesting value does not exists. Dictionary it is generic type because key and value are declared with datatypes. It is fast because no need to convert value Continue Reading…

What is yield in C#.

yield keyword is used for customized iteration in a collection. It is used inside an iterator block which return iterator type. It can not be used directly inside Main method which is void type. Uses of yield keyword : No need to create temporary list. As it returns value back to caller for every match Continue Reading…

What is an Obsolete in C#.

Obsolete is an attribute which is used to mark a member of class or class that is no longer in use. You can pass a custom message to this attribute which will be shown when calling these members or class. When you will call isNumeric() method. It will show you custom warning as “This method Continue Reading…

Security in ASP.NET Web API.

Security can be provide in ASP.Net Web API using Authentication and Authorization. Authentication means user identity to the system. user is able to login to a website. Example Google Account. Authentication is provided using HTTP Module and HTTP Message Handler. HTTP Module- You can configure your project to IIS to use built in authentication i.e; HTTP Continue Reading…

CRUD Operations using ASP.NET Web API.

This Tutorial will explain how to implement crud operations using ASP.NET Web API. Open Visual Studio 2012. Go to create new project tab. Select “Asp.Net MVC 4 Web Application.” Then select Web API from Project Template. using ASP.NET Web API Crud operation are performed by GET – To Get data from database POST – To Continue Reading…

SQL Helper Class in Asp.Net

SQL Helper class is used in Data access layer which interact with data base with the help of connection string provided. It contains ExecuteNonQuery, ExecuteDataset, ExecuteReader, ExecuteScalar, ExecuteDataTable, ExecuteDataSet and more methods which helps in performing CRUD operations. Link to download SQL Helper class SQL Helper Class

Highlight parent menu when child menu is selected in Asp.net.

To highlight the parent menu we need to first find out the selected menu item and then find the top most parent of the selected item. Make the top most parent of the selected menu item selected and apply the selected css. Below is the code implementation. Add CSS part to your page Write the Continue Reading…