Rank: Newbie
Groups: Member
Joined: 11/18/2008(UTC) Posts: 1
|
Hello, I'd like to rotate my TIFF image in my ASP.NET viewer via AJAX. I'm using the invokeRemoteMethod but it doesn't seem to work. Can you please give me some hints? Thanks in advance. My VB code: Quote: <Aurigma.GraphicsMill.AjaxControls.RemoteScriptingMethod()> _ Public Sub RotateLeft() BitmapViewer1.Bitmap.Transforms.RotateAndFlip(Drawing.RotateFlipType.Rotate270FlipNone) End Sub
My method call (JS): Quote:bitmapViewer1.invokeRemoteMethod("RotateLeft", null); I'm sure the bitmapViewer is working. Because I'm also using some navigators in JS (something like the TIFF webdemo).
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi, I have prepared sample for you which allows to rotate tiff image. It works well for me. Please try to use it. Code:
<%@ Page Language="VB" AutoEventWireup="true"%>
<%@ Register TagPrefix="aur" Assembly="Aurigma.GraphicsMill.AjaxControls"
Namespace="Aurigma.GraphicsMill.AjaxControls" %>
<script type="text/VB" runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
BitmapViewer1.Bitmap.Load(Server.MapPath("test.tif"))
BitmapViewer1.ViewportAlignment = Aurigma.GraphicsMill.AjaxControls.ViewportAlignment.CenterCenter
End Sub
<Aurigma.GraphicsMill.AjaxControls.RemoteScriptingMethod()> _
Public Sub RotateLeft()
BitmapViewer1.Bitmap.Transforms.RotateAndFlip(Drawing.RotateFlipType.Rotate270FlipNone)
End Sub
</script>
<!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>Remote Scripting</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager runat="server" ID="ScriptManager1" />
<table cellpadding="10">
<tr valign="top">
<td>
<aur:BitmapViewer runat="server" ID="BitmapViewer1" ZoomMode="BestFit"
ScrollBarsStyle="Auto"></aur:BitmapViewer>
</td>
<td>
<input type="button" value="Rotate Left" onclick="RotateLeft()" />
</td>
</tr>
</table>
</div>
<script type="text/javascript">
function RotateLeft() {
var bv = $find("BitmapViewer1");
bv.invokeRemoteMethod("RotateLeft");
}
</script>
</form>
</body>
</html>
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.