Merhaba arkadaşlar bu örnek makkalemde sizlere asp.net bir web sayfasında popup pencere nasıl kullanılır onu görelim
Örnek uygulamam da sadece bir default web page ve bir adet xml.file ekliyorum örnek kodlara bakarsanız zaten görmüş oluçaksınız
——-> default web page kodum
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head id=”Head1″ 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’;
newwin=window.open(url,’windowname5′, params);
if (window.focus) {newwin.focus()}
return false;
}
</script>
</head>
<body>
<form id=”form1″ runat=”server”>
<div>
<a href=”javascript: void(0)” onclick=”popup(‘XMLFile.xml’)”> Pencereyi Ortada Göster</a>
</div>
</form>
</body>
</html>
———>Xml File kodum
<?xml version=”1.0″ encoding=”utf-8″ ?>
<Employee>
<UserName>
orhan
</UserName>
<Password>
12345
</Password>
<Experience>
2.5
</Experience>
<Department>
Software And System Enginee
</Department>
</Employee>