Data Haunting

Easy Solutions Destination

By

Render a Razor view to string in Asp.net MVC

Today in this article we will see how to render razor view or partial view to string in Asp.net MVC. View or partial view contains generally html tags and razor syntax, if we can convert view into string using C# than we can pass string as a Json Result from controller to view(for Ajax call). Let’s see sample code.

By

Convert Amount Numbers(Rupees, Dollar) into Words using C# and VB

We have many times scenario of converting Amount Numbers which are Rupees, Dollar, Pound, Euro or any currency into Words while we programmed. Today We will see the easiest logic of converting Amount numbers into words in C#,VB or Asp.net without using of any loop and recursive functionality.

By

Difference between Hashtable and Dictionary in c#

Hashtable and Dictionary both are collection of Data Structure to hold data as key and value pair but Hashtable and Dictionary both are difference in terms of use and structure. In this article we will see Difference between Hashtable and Dictionary with example and when we have to use Hashtable and Dictionary in c#.

By

A potentially dangerous request.form value was detected from the client error in Asp.net Web forms and MVC

I have faced A potentially dangerous request.form value was detected from the client error many times while working with CkEditor or by entering special character in Asp.net web forms and Asp.net MVC. Here I am explaining complete solutions step by step and also reason for this error.

By

Understand static keyword with example in c#

This article will explain about static class and members of static class like static method and static variables . To access static method and static variables doesn’t need to create instance of it’s class . Let’s try to demonstrate by example .

By

C# Abstract class with example

Abstract class in C# acts as a base class. Abstract Class can not be instantiated and can only be derived by its child classes. The need of abstract class is to provide some basic functionality which is used by it’s child classes so they can override and share. Let’s take a look at  member of  abstract class and abstract method.

By

Difference between ref and out in c#

In C# many times we have used ref and out parameters. In this article we will compare ref and out with example and will try to find out difference between reference and out keywords in c# and will conclude which is best among ref vs out.