How to use CustomValidator in aspx page?

The CustomValidator control allows you to write a method to handle the validation of the value entered in aspx page and you can use this in this way:

Open a new Tab/Window by using Response.Redirect and it open in new web page

Here I am going to explain how to open new tab/window on Button click using A week ago, i have to implement that code. I have option to use java-script to open new tab. But I have to insert or update some database entry. Yeah i know that there is another way to use client-script in code behind to achieve this. But in its simplest form, following code open new tab/window.


How to JSON Serialization and Deserialization in ASP.NET

JSON is one kind of data format which is designer for running JavaScript on website. At present, JSON is widely used in web. This article focuses on JSON Serialization and Deserialization in ASP.NET, including the brief introduction of JSON, how to serialize and deserialize with ASP.NET and operation on date, assembly, dictionary. 1. JSON Brief Introduction JSON (JavaScript Object Notation) is one ligthweight data exchange format. JSON is “name/value” assembly. Its structure is made up with {}, [], comma, colon and double quotation marks. And it includes the following data types: Object, Number, Boolean, String, Array, NULL. JSON has three … Click here to continue…..

Delegate in JavaScript

JavaScript Event Delegation is a technique you may have heard of. It’s a different way of using event handlers that offers clear benefits and is becoming more popular amongst web developers. I’ll give a brief overview of event delegation in JavaScript, along with why you should consider it. Note that this tutorial will use the great jQuery library for most examples. Delegation Delegation is a fairly well-known design pattern. In short, it is a way for a method to produce its result simply by calling a method on another object, thus delegating responsibility to that object to provide the functionality … Click here to continue…..

Calling MVC Actions from Javascript

Suppose we have a very simple action method: it takes no parameters and just returns a string:

What if we would like to call this action method from javascript through Ajax and to display the value it returns? We can do it with jQuery:

Not so bad, after all. However, let think, about all implications of the above simple raw approach to the interaction with an action method: Repeating the above code several times in an application is annoying, and error-prone. We have no access to Razor helpers from within js files, so we can’t use @Url.Action, and … Click here to continue…..