Completely Free .NET word API

Resources » Code Snippets » ASP.NET WebForms

How to show popup window using

Updated: Category: ASP.NET WebForms
Author: Member Level: GoldPoints: 4

How to show popup window using

This is very simple project.if you want to show centered pop up window means,just see the below example.
In ASPX File

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">

function popup(url)
var width = 300;
var height = 200;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';,'windowname5', params);
if (window.focus) {newwin.focus()}
return false;

<form id="form1" runat="server">

<a href="javascript: void(0)" onclick="popup('XMLFile.xml')">Centered popup window</a>


XML File:-

<?xml version="1.0" encoding="utf-8" ?>

Related Resources:

Read related articles: Show popup   Modal dialog   Modal Popup   

Did you like this resource? Share it with your friends and show your love!

Responses to "How to show popup window using"
Author: Ultimaterengan  25 May 2010   Member Level: Gold   Points : 1
This is very simple project.if you want to show centered pop up window means,just download the below project and run it.Some times we need to show information with in pop up window in that time we will use this project code.

Author: anish  26 May 2010   Member Level: Bronze   Points : 2
call pop up alert in button OnClientClick event

In head section of .aspx page Put this

Author: nilesh  11 Aug 2010   Member Level: Bronze   Points : 2
hey i m new at using js in
can any one tell me how to call js function in c# file.
but function in js file is defined as followed:
function_name : function()



when i try it to call with scriptmanager it gives me error that function is not defined.

plz its urjent..
can any one plz help me????

Author: Ultimaterengan  12 Aug 2010   Member Level: Gold   Points : 1
HI friend,
Post your question in forum will get quick response.


Post Comment:

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)

    Type the numbers and letters shown on the left.

    Submit Article     Return to Article Index
    Subscribe to Subscribers
    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Talk to Webmaster Tony John

    Online Members

    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India