Click here to Skip to main content
15,883,953 members
Articles / Programming Languages / Java

Ajaxion - Standalone AJAX - Part 2 of 2 - C# and Java Example

Rate me:
Please Sign up or sign in to vote.
4.97/5 (34 votes)
22 Jan 2013CPOL5 min read 55.2K   1.4K   42  
An article about how to keep AJAX simple as it is and get the most out of it.
<%@ Page Language="c#" Inherits="AjaxionTest.DragDrop" CodeFile="DragDrop.aspx.cs" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
	<title>DragDrop</title>
	<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
	<meta content="C#" name="CODE_LANGUAGE">
	<meta content="JavaScript" name="vs_defaultClientScript">
	<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">

	<script src="Ajaxion/js/ajaxion.js" type="text/javascript"></script>

	<script src="js/DragDrop.js" type="text/javascript"></script>

	<script src="js/DragDropAspx_AjaxionEvents.js" type="text/javascript"></script>

</head>
<body bgcolor="lavender">
	<form id="Form1" method="post" runat="server" style="width: 100%; position: static;
		height: 100%">
		<table id="Table2" height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
			<tr>
				<td align="center" bgcolor="silver" height="25">
					<table id="tblStatus" cellspacing="5" cellpadding="0" border="0">
						<tr>
							<td>
								<asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label></td>
							<td>
								<div id="status" style="display: inline; font-weight: bold">
									Ready</div>
								&nbsp;
							</td>
							<td>
								<img id="statusImg" style="width: 150px; height: 17px; background-color: silver"
									height="17" src="images/ready.JPG" width="150" border="1"></td>
							<td style="border-left: black thin solid">
								&nbsp;<asp:HyperLink ID="lnBack" runat="server" NavigateUrl="Default.aspx" Font-Bold="True"
									ForeColor="Blue">Main demo</asp:HyperLink></td>
							<td style="border-left: black thin solid">
								&nbsp;
								<asp:HyperLink ID="HyperLink1" runat="server" ForeColor="Blue" Font-Bold="True" NavigateUrl="UseWebUserCtrl.aspx"> Control demo</asp:HyperLink></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td align="center">
				</td>
			</tr>
			<tr>
				<td align="center">
					<table id="Table1" style="width: 490px; height: 54px" bordercolor="gray" cellspacing="0"
						cellpadding="0" border="1">
						<tr>
							<td align="center">
								<img id="drag1" ondragenter="dgdp.SetSourceId(ElemId(event));" onmousedown="dgdp.SetSourceId(ElemId(event));"
									title="HappyAccountant.jpg" ondragover="dgdp.DefaultActionIE(false);" height="50"
									src="images/HappyAccountant.jpg" width="70"></td>
							<td align="center">
								<img id="drag2" ondragenter="dgdp.SetSourceId(ElemId(event));" title="AjaxFlavour1.gif"
									onmousedown="dgdp.SetSourceId(ElemId(event));" ondragover="dgdp.DefaultActionIE(false);"
									height="50" src="images/AjaxFlavour1.gif" width="70"></td>
							<td align="center">
								<img id="drag3" ondragenter="dgdp.SetSourceId(ElemId(event));" onmousedown="dgdp.SetSourceId(ElemId(event));"
									title="AjaxFlavour2.gif" ondragover="dgdp.DefaultActionIE(false);" height="50"
									src="images/AjaxFlavour2.gif" width="70"></td>
							<td align="center">
								<img id="drag4" ondragenter="dgdp.SetSourceId(ElemId(event));" onmousedown="dgdp.SetSourceId(ElemId(event));"
									title="AjaxFlavour3.jpg" ondragover="dgdp.DefaultActionIE(false);" height="50"
									src="images/AjaxFlavour3.jpg" width="70"></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td style="font-weight: bold" align="center" height="30">
					<table id="Table3" style="width: 696px; height: 57px" cellspacing="0" cellpadding="0"
						width="696" border="0">
						<tr>
							<td style="font-weight: bold">
								IExplore and Opera 9.02: drag the above thumbnails and drop them below to see the
								enlarged images.</td>
						</tr>
						<tr>
							<td style="font-weight: bold">
								Mozilla Firefox:&nbsp;click the source thumbnails and then&nbsp;click the&nbsp;target
								image below.</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td align="center" height="100%" width="100%">
					<img id="drop" ondragover="dgdp.DefaultActionIE(false);" ondrop="dgdp.Drop(event);"
						onmouseup="dgdp.Drop(event);" height="525" src="images/HappyAccountant.jpg" width="700">
				</td>
			</tr>
		</table>
	</form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
New Zealand New Zealand
Coder

Comments and Discussions