Skip to main content


Showing posts from August, 2011

Validation for blank field in javascript

Here is the code for validate text box for not to be leave blank it pop up a message box when user leave field blank 'The required field has not been filled in' just copy and paste this code and pass the parameter that is id of text box.

function check_blank(tbId) { var tbObj = document.getElementById(tbId); if (tbObj.value.length == 0 || tbObj.value.charAt(0) == " ") {         alert("The required field has not been filled in"); returnfalse;     } }

How to validate dropdownlist in JavaScript

In this article you will see how to put validation in dropdownlist by javascript, suppose first item value of dropdownlist is 0 and text is "-Select-" just like given below and we have to validate that at least one item is selected excluding default i.e "-Select-".

Validate radiobuttonlist in javascript

Here is the function for validating radiobutton list to select at least on Item through JavaScript radio button list is a ollection of rediobuttons so we have to navigate all sub radio button and check that if selected or not.

Geting controls inside a table in javascript

Often we need to navigate in html container controls like table, div, p etc through JavaScript for doing some type of validation or another task with child of that container control for that we need to

How to open print dialog box to print page or part of the page in JavaScript

some time we need to print only a portion of page or whole page through Javascript, Javascript provide a function named print() to print the current page, so if you want to print whole page then just call window.print() function but if you want to print specific portion of the page then you need to do something extra. Handler For Writing and Downloading Binary

An ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NETWebapplication. The most common handler is an ASP.NETpagehandler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler. You can create your own HTTP handlers that render custom output to the browser.

The HttpHandler is apre-processing logic implementationblocks and is the part of the ASP.NET request pipeline. Whenever theIISServerrecieves a request, it looks for anISAPIfilter(looking for the perticuler httphandler to handle a perticuler extension) that is capable of handlingweb requests.
ASP.NET maps HTTP requests toHttpHandlers. Each HttpHandler enables processing of individual HTTP URLs or groups of URL extensions within an application.Handlers are considered to be more lightweight object than pages. That's why they are used to serve dynamically-generated images, on-the…

Comparing two date in JavaScript

This is an article to show how to calculate two date difference using JavaScript.

By subtracting two date java script returns difference in milliseconds so if we want to show difference in days then we have to convert milliseconds value into days by multiplying some factor.

Back button in JavaScript

Go Back using Java Script:-
Here is an article showing that how to redirect to a back page within client side through java script.

Java Script have a method history.back() by which we can go to the just back page in browser through browser cache if cache not removed otherwise from server side.

<asp:LinkButtonID="btnBack"runat="server"style="font-size:14px;color: Black ;font-family:Arial;font-weight:bold;"Text="Back"OnClientClick='javascript:history.back(); return false;'/>

Making compute column in with conditions

A question came up in the My Mind as to how to handle Data Column Expressions within a DataTable in Ado.Net. The expression syntax available to create calculated columns is probably much richer than you might think if you don't play around a lot with the Expression Property of the DataColumn.

Sending email in with email body

This article is for sending email from with the use of gmail smtp server for that we have to required gmail credential, provide SmtpClient class for connecting to the smtp server andMailMessage for getting mail requirement.

Get Server Name and Server Port No in Asp.Net

As we know that there is a need to get server name or port no at run time that request came from where, is port no exist or not to make application dynamic URL, assume when we are working in

Sending emails in using Gmail Credentials

This article is for sending email from with the use of gmail smtp server for that we have to required gmail credential, provide SmtpClient class for connecting to the smtp server and MailMessage for getting mail requirement.

Refreshing page in Javascript

In this article we will see that how to refresh or reload a page through Java Script there are a lot of ways to refresh or reload a document depending how we want (from server side