A
Alexander Vasilevsky
there is a Default.aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="AyreonsWorld.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" lang="en">
<head id="homePageHead" runat="server">
<title>Title</title>
<script type="text/javascript" language="javascript">
window.onload = function()
{
var button = document.createElement("input");
button.type = "button";
button.id = "testButton";
var mainDiv = document.getElementById("mainDiv");
mainDiv.appendChild(button);
};
</script>
</head>
<body background="Images/Back.bmp">
<form id="home_form" runat="server">
<div id="mainDiv"></div>
</form>
</body>
</html>
How can I attach to created button an event that would be described in
Default.aspx.cs and worked after pressing? Thank in advance.
http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas
Gift
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="AyreonsWorld.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" lang="en">
<head id="homePageHead" runat="server">
<title>Title</title>
<script type="text/javascript" language="javascript">
window.onload = function()
{
var button = document.createElement("input");
button.type = "button";
button.id = "testButton";
var mainDiv = document.getElementById("mainDiv");
mainDiv.appendChild(button);
};
</script>
</head>
<body background="Images/Back.bmp">
<form id="home_form" runat="server">
<div id="mainDiv"></div>
</form>
</body>
</html>
How can I attach to created button an event that would be described in
Default.aspx.cs and worked after pressing? Thank in advance.
http://www.alvas.net - Audio tools for C# and VB.Net developers + Christmas
Gift