javascript close current window without prompt

I searched a lots of solution for closing window without prompt and I got lots of script, but scripts was  not working for all the version of  internet explore some working in IE7 and some in IE8 so I wrote an unique solution which works in all version of internet explore.

Browser detection in javascript

Here is the article for accessing browser info like(Name, version, user agent, cookies enable or disable etc) through javascript it can be done through an object named navigator, navigator object have lots of properties e.g appName for Browser Name,appCodeName for getting Code Name, appVersion for getting browser version info, userAgent etc.

Customize comment box in blogger

Now it is possible to customize your blogger comment box in simple way there no need to edit HTML of your blogger just through the adding some simple css to the blogger.

jquery find text in table and highlight

The bellow article is for how to highlighting text into a webpage through java script you can try demo bellow just type words to the text box it will be highlighted in the table as yellow background color you can add you custom css for the highlighted text but the name of css class must be .highlighted.

What is NameSpace in .Net

This a basic question which allways asked in the interview that what is the namespace ,do you know about namespace,can you tell me some words about namespace.

How to make find and search functionality in html table through javascript

I have search a lot of article for how to make search in HTML table but i didn't find any good article so i wrote my own article for that, Here is a script given bellow for how to make search in HTML table the question is that how to use this code so here is the step by step instructions :- 

Difference between abstract class and interface

Here is an example to show the difference between abstract class and interface in c#

What is abstract class in c#

Abstract class is a class that contain complete and abstract (incomplete) both type of member and it can not be instantiated, Abstract classes are one of the essential behaviors provided by dotnet.

What is a Interface in C# .Net

Interface is a type which contains only the signatures of methods, delegates or events, it has no implementation.
Implementation of the methods is done by the class which implements the interface.

Scrollable Gridview with fixed headers in

horizontal and vertical scrollable Gridview with static header row.fixed header in gridview in header in gridview through java script.

I was looking for a solution for this for a long time and found most of the answers are not working or not suitable for my situation i also find most of the java script code for that they worked but only with the vertical scroll not with the horizontal scroll and also combination of header and rows doesn't match.

Double equals vs Triple equals in JavaScript

Difference between == and === or double equal vs triple equal operators in JavaScript,
JavaScript has both strict and type-converting equality comparison Operators.

Scrollable HTML Table with fixed header in javascript

Horizontal and Vertical scrolling table with static header row.Fixed headers in large HTML tables.static header in table through java script.

I was looking for a solution for this for a long time and found most of the answers are not working or not suitable for my situation i also find most of the java script code for that they worked but only with the vertical scroll not with the horizontal scroll and also combination of header and rows doesn't match.

Difference between the having clause and where clause in sql server

1) Where Vs Having in sql server
2) Having vs Where which is better in sql server.

The main difference between Where clause and Having Clause is that Having is allays use with the group by statements  while Where is used with the Whole query.

Where and in which format View State information stored in a webpage in


View state data stored in which format.

where is view state information stored (server or client)?

View state data is stored in the client side(Webpage) in the form of a hidden control(HTML hidden field) named “__VIEWSTATE” and View State Data is stored in Base64 String encoded format which can be further decoded.

Select all div text in single click in JavaScript

Here is the code for selecting a div content through javascript with single click of button or mouse click, just copy and paste javascript code given bellow and call the function selectText at the button click and pass the parameter divid.

Highlighting text inside div in JavaScript

The bellow article is for finding a text on the a div content and highlighting that search text.
we can use this article by two way getting highlighting search text through the prompt of java script or pass default highlighting search text to the function.

An Analog Clock Widget for Blogger or WebSite

Here is the code for getting an analog clock widget  for your blog or for your website, This all clock as on Indian time just copy and paste code bellow on your page where you want to show the clock.

Highlighting text in web pages in JavaScript

Below article is for finding a text on the webpage(document) and highlighting that search text.
we can use this article by two way getting highlighting search text through the prompt of java script or pass default highlighting search text to the function.

Finding, convert text input into hyperlink in JavaScript

The bellow article is for finding a text on the webpage and convert that text into a link.
we can use this article by two way 
Getting search text and link herf through the prompt of javascript or pass default search text and link href to the function.

Scrolling a Div in JavaScript

Here is a example to scroll div through javascript by clicking a button or linkbutton bellow is 5 linkbutton for scrolling different-different way to a div content Scroll Top,Bottom,Absolute,Up and Down.

Update table from another table in sql server

Here is the example to update table from another table where Empid is same and according some conditions.

We have to update 'tblEmpdetails' table

A search box widget for blogger

Now it is possible to add and customize search box on your blogger 
you can add search box on your blog by two way,

Getting elements of an iframe in javascript

Iframe always get through the frames collection of a document through document.frames (not through

What is AppSetting Section in Web.Config file in

Web.config file defines configuration for a web project. Using "AppSetting" section, we can define user-defined values (custom key value dictionary) like "service url, stop word, Max Connection, mail server, mail port etc, that will be accessible through configuration  manager class through out the project for any other purpose.


   <add key="connection1" value="server=tdsw008;database=ERM; uid=sa;pwd=********;"/>
   <add key="connectionSAP" value="server=;database=ACDB_PROD;uid=sa;pwd=********"/>
   <add key="ServerName" value="tdsw017"/>

What is the use of @ Register directives in

@Register directive informs the compiler of any custom server control (like ajaxcontrols, usercontrol.ascx) added to the page.


What is event bubbling in Asp.Net

Handling(tracking) child controls events (only button type child controls) through parent control in data bind controls known as event bubbling.

Identifying that the Page is Post Back or not in

When you need perform different different task according to Get and Post request type then you should know about current request of which type and how to identify it.

Accept only number in a text box in JavaScript

1) Allowing only certain character in a text box.
2) Validation in TextBox which accepts only numbers value.
3) Allow only numbers / digits in TextBox.

Here is the code bellow

How to run a .bat file from in the server side

In we can use System.Diagnostics.Process class to run the .bat file but it is not allowed in IIS for some security purpose So we have

How To Remove Nav Bar in Blogger

a)How to hide the Blogger Navbar
b)How to Remove the Blogger Banner

Favicon-Adding a shortcut icon on address bar for blogspot or webpage

a)Display My Logo on Browser Address Bar or Favorites Menu.
b)How to add or Change Favicon in Blogger Blog?

Event In which all controls are fully loaded in

Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init event but you will see that view state is not fully loaded during this event.

What is the ASP.NET Page Event Life Cycle

What is the sequence in which ASP.NET events are processed

Following is the sequence in which the events occur:-

Binding a version in two version of same assembly in GAC.

You need to specify “bindingRedirect” in your config file. For
instance in the below case “ClassLibraryVersion” has two versions “1.1.1830.10493” and “1.0.1830.10461” from which “1.1.1830.10493” is the recent version. However, using the bindingRedirect we can specify saying “1.0.1830.10461” is the new version. Therefore, the client will not use “1.1.1830.10493”

difference between Convert.toString and .toString in .Net

There a lot of confusion that what is the difference between convert.toString and .toString my friend always asked me about that just to give an understanding of what the above question means see the below code.

What is CODE Access security In .Net Framework

Interview Questions:-

CAS is part of .NET security model that determines whether a piece of code is allowed to run and

How to prevent my .NET DLL to be decompiled In .Net

Interview Questions:-
By design, .NET embeds rich Meta data inside the executable code using MSIL. Any one can
easily decompile

difference between System exceptions and Application exceptions in .net

Interview Questions:- 

All exception derives from Exception Base class. Exceptions can be generated programmatically

What is Boxing and Unboxing In .Net Framework

Boxing and unboxing act like bridges between value type and reference types. When we convert value type to a reference type it’s termed as boxing.
Unboxing is just vice-versa. When an object box is cast back to its original value type, the value is copied out of the box into the appropriate storage location.

What are Value types and Reference types In .Net

Interview Questions:-

Value types directly contain their data that are either allocated on the stack or allocated in-line in

What are the types of JIT (Just-in-time) compilation in .Net

Interview Questions:-

JIT compiler is a part of the runtime execution environment.
In Microsoft .NET

How Can we force garbage collector to run In .Net

Interview Questions:-
System.GC.Collect() forces garbage collector to run. This is

What is garbage collection In .Net

Interview Questions:-

In DotNet FrameWork, garbage collection (GC) is a form of

GAC: What is Delay signing In .Net Framework

Interview Questions:- 

During development process you will need strong name keys to be exposed to developer which is

How to add an assembly In GAC In .Net Framework

 Interview Questions:-

• Using Gacutil. Go to “Visual Studio Command Prompt”

GAC: What is the strong names (SN.EXE) to assembly In .Net

Interview Questions:-

Strong name is similar to GUID (It is supposed to be unique in space and time) in COM

GAC: What is GAC (Global Assembly Cache) In .Net Framework

Interview Questions:-

GAC (Global Assembly Cache) is where all shared .NET assembly

assemblies: Is versioning applicable to private assemblies In .Net

Interview Questions:- 

Versioning concept is only applicable to global assembly cache

Where is version information stored of an assembly In .Net

Interview Questions:-

Version information is stored in assembly inside

What is Manifest In .Net Assembly

Interview Questions:-

Assembly metadata is stored in Manifest. Manifest contains all the metadata needed to do the

What is ILDASM (Intermediate Language Disassembler) Tool In .Net Framework

Interview Questions:-

When it comes to understanding of internals, nothing can beat ILDASM. ILDASM converts the

What is Difference between NameSpace and Assembly In .Net

what is the difference between namespace and assembly is the most frequently asked question in the interview and its very easy to understand the differnce,Following are the differences between namespace and assembly:

What is NameSpace In .Net Framework

Interview Questions:- 

Namespace has two basic functionality:-
• NameSpace Logically group types, example System.Web.UI logically

What are the different types of Assembly In .Net Framework

Interview Questions:-

There are two types of assembly Private and Public assembly. A private assembly is normally

What is a Assembly (.DLL .EXE) In .Net Framework

Interview Questions:-

• Assembly is unit of deployment like EXE or a DLL.

• An assembly consists of one or more files (dlls, exe’s, html

What is a Managed Code In .Net Framework

Interview Questions:- 

Managed code runs inside the environment of CLR i.e. .NET runtime. In short, all IL are

What is a CLS (Common Language Specification) In .Net Framework

This is a subset of the CTS, which all .NET languages are expected to support. It was always a dream of Microsoft to unite all different languages in to one umbrella and CLS is one-step towards that. Microsoft has defined CLS, which are nothing but guidelines, that language should follow so that it can ommunicate with other .NET languages in a seamless manner.

CTS , CLS Explaition :

CTS is a base class library that contains all type information like Int32, Int64, String Boolean etc.  CLR understands only base type of library type not others type like CLR dont know what is int (C#) or Integer (VB) CLR only know Int32 type, So what about the CLS - CLS just a documentation that map base type into different - 2 language datatype, compiler reads and converts language datatype to documented base type (i.e CTS type) e.g compiler reads the associated base type of int(C# Integer in VB) is Int32 from CLS guidelines and convert it to Int32.

How to sort only displayed rows in gridview in using c#

How can we sort the elements of the current page only? And other pages should not be sort in gridview.
In this article you will see how to sort gridview only current page not all records.

We have to do following task for that:-

How to make image slide show from javascript

In this javascript article you will see how to make a simple and light weightage ( with no extra plugins required ) image slide show from JavaScript.

What is Common Type System CTS In .Net Framework

Interview Questions:-
In order that two language communicate smoothly CLR has CTS (Common Type

What is CLR The Common Language Runtime In .Net Framework

Interview Questions:-
Full form of CLR is Common Language Runtime and it forms the heart of the .NET framework.

Exporting Pie Chart into excel file from csharp

This Article shows how to make a 3D Pie chart from a datatable into an Excel file , save this file and open the excel application through C#.
It works with .Net Development Server  while it will not not work in application
hosted on IIS cause IIS does not allowed to start a process on server at all.

using Excel=Microsoft.Office.Interop.Excel;

Calling server function on fileupload text change in

How to Post a page to server on fieupload path change by client in
Here is a code for doing postback when u click on browse button of a file upload and choose a file then
Page posted to the server through linkbutton refrence and server involk the linkbutton_click event and you can
upload your file at linkbutton click event.

//****************Code of .Aspx File**************
<asp:FileUpload ID="fu" onChange="FileUploadPostBack();"

Capturing screenshots,Image of a webpage in using C#

How to capture web page screenshot in using c#
This article presents a using C# routine for capturing an entire web page as an image. 

 using System.Drawing;

How to get list of all dates between two dates in

If you want to work with one by one dates between two dates then you have to get all dates between that perticuler dates in with csharp.    

  List<DateTime> li = new List<DateTime>();

Importing all sheet of excel 2003 .xls,2007 .xlsx file into dataset and bind it to gridview in c#

In this article you will see how to import all sheet from excel 2003 and 2007 file to c# dataset object and then you will display this data into girdview.

Method ImportExcelXLS given below takes two parameter first full path of .xls or .xlsx file and another bool type hasHeaders that is for including header of sheet or not, if you want to import data client file then you need to upload this file through fileupload and save this posted file to the server then pass this server full file path to this method and display data to girdview.

Uploading files to ftp server programmatically in

This code sample shows how to use using C# code to programmatically upload files to an ftp server,There is a lot of ways  to upload file to FTP Server here is the two of them first using with FtpWebRequest and another with WebClient.

Importing data from excel 2003 file in a gridview in c#

In this article you will see how to import given sheet from excel 2003 file into dataset and then display this data into girdview.

Below is the code for import data from given sheet named Sheet1$ into dataset then bind it to gridview, change sheet name as per your excel sheet name you have to ad suffix $ in sheet name.

Exporting gridview data into excel (.xls,.xlsx) file in c#

How to export table/gridview/datagrid to excel in :-
To export a datagrid or a gridview data we have to get rendered html in server side for that we use 'RenderControl' property of controls which gives the render html in a HtmlTextWriter and then copyied
in a StringWriter.
For exporting a table add an attribute Runat='Server' in table
MyTable = ID of Gridview/Datagrid/table (runat='server')

using System.Web.UI.HtmlControls;

Check, Uncheck all checkboxes of a gridview in header checkbox check change in javascript

This is article shows how to Check/Uncheck select/deselect child checkboxes of a table or gridview on header checkbox check change in through JavaScript.

show alert message from server side

If you want to show msg if you are posting the page to server through update panal (asynchronous postback) then you have to use this function.

//During Asynchronous Post Back in Update Panal Use ScriptManager (Inside Update Panal)
public void alertBox(string Message)

Moving Image through javascript like flash file in

This article used for making slide show from JavaScript. Many time we need to do such task like moving images in html pages or an aspx page then we think about flash to do that task but it is must to install flash plugin in client browser,so we need an alternative solution of flash to move image just like flash, so here is the solution for making image slide solution through javascript, Just Add Your Image In Picture Array And Add Fuction to body onload.

Validating all type of controls in a form using javascript Forms Validation

Form Validation in Javascript


//**************Blank check validation*********************

        function check_blank(fldid, msgid) {
            var fld = document.getElementById(fldid);
            if (fld.value.length == 0 || fld.value.charAt(0) == "

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");
        return false;

How to validate email address in javascript

Recently i have posted how to validate mobile number by javascript, how to validate mobile  number, email address through jquery and now this article will show you how to validate email address using simple javascript or using regular expression in javascript.

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-".

How to validate mobile number in javascript

Recently i have posted how to validate email address in javascript, how to validate mobile number and email address in jquery and not i will show you how to validate mobile number using simple javascript or using regular expression in javascript.

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.

Printing a content of page through javascript

A lot of time as we know that we required make a print functionality to print a our web page as to print a specific portion or a whole page,

Uploading larger file through file upload in

This article if for how to upload larger file through file upload control in, we have to change web config setting for uploading larger file through file upload control. 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.NET Web application. The most common handler is an ASP.NET page handler 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 a pre-processing logic implementation blocks and is the part of the ASP.NET request pipeline. Whenever the IIS Server recieves a request, it looks for an ISAPI filter(looking for the perticuler httphandler to handle a perticuler extension) that is capable of handling web requests.

ASP.NET maps HTTP requests to HttpHandlers. 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-fly generated PDF-files and similar content to the web browser.

below is an example (.ashx file)..

<%@ WebHandler Language="C#" Class="DownLoad" %>
using System;
using System.Web;
using System.Data;
using System.Data.SqlClient;

public class DownLoad : IHttpHandler {

  CompCls ObjComp = new CompCls();
  public void ProcessRequest(HttpContext context)
     string conString = ObjComp.strCon;
     SqlConnection con = new SqlConnection(conString);
     string Proj = context.Request["id"];
     SqlDataAdapter Ad = new SqlDataAdapter("SELECT   Attachment,AttachmentFileName FROM tblProjectsAttachment WHERE EntryId=@EntryId", con);
    Ad.SelectCommand.Parameters.AddWithValue("@EntryId", Proj);
    DataSet DS = new DataSet();

    using (con)
        byte[] file = (byte[])DS.Tables[0].Rows[0][0];
        string Filename = DS.Tables[0].Rows[0][1].ToString();
            ("Content-Disposition","inline;attachment; filename=\"" + Filename + "\"");
             context.Response.AddHeader("Content-Length", file.Length.ToString());
             context.Response.ContentType = "application/octet-stream";
        catch (Exception ex)
            context.Response.ContentType = "text/plain";


 public bool IsReusable {
    get {
        return false;

Want to more about http handler and http module go to below link (httphandler and httpmodule in

If We are hosting your application in IIS 7 then you have to do some additional setting in IIS 7 to be register httphandler and httpmodule in IIS 7 take look at this link below. httpmodules-and-httphandlers-in-iis-7.html

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:LinkButton ID="btnBack"  runat="server" style="font-size:14px;color: Black ;font-family:Arial;font-weight:bold;" Text="Back" OnClientClick='javascript:history.back(); return false;'  />

Generating random number and string in c#

Random class defined in the .NET Framework class library provides functionality to generate random numbers.

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 and MailMessage 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.

Sorting only current page of Gridview in c#

In this article I will explain how to sort Gridview only current page not all records (sorting the displayed rows of current page only).

Calling server side (cs file) method from client side through Page Method in C# (CSharp)

// .Aspx Coding //

<script type="text/javascript">

function CallMe(src,dest) {
var ctrl = document.getElementById(src);

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

Access Query string in javascript

Many time we need to access query string through javascript for a specific task but there is no built in funciton of javascript to access querystring.

You have to make your own function just read current url string by window.location.href property of javascript, split this urlstring by the char '?' and '&', enumerate this array of string and further split by the char '=' then the first value must be the key and second one is the value of that key.

deleting/removing row of a table using javascript

Here is an example to delete row dynamically by their position. 

dynamicTbl =Table Client id

function deleterow() {

Adding dynamic row and control into a table through javascript

How to add TR , TD and Controls into a table from javascript:-
here is a example to add row and file upload into table dynamiclly.
while table row cantain 3 cell.

var count = 0;

function addrow() {

Recent Posts