This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
tw3  
#1 Posted : Monday, September 1, 2008 11:26:21 AM(UTC)
tw3

Rank: Newbie

Groups: Guest
Joined: 9/1/2008(UTC)
Posts: 7

I am trying to place the BitmapViewer control on a ModalPopupExtender and have the image displayed without a postback. I retrieve image search results to a GridView control and display the image in the ModalPopup after the user clicks on a row. The issue I’m having is the BitmapViewer will not display the image without a PostBackTrigger on the UpdatePanel for the GridView.
Any ideas or help?
Fedor  
#2 Posted : Tuesday, September 2, 2008 8:17:22 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Could you post the code of page to understand and repeat the problem?

Thank you.
Best regards,
Fedor Skvortsov
tw3  
#3 Posted : Wednesday, September 3, 2008 11:04:18 AM(UTC)
tw3

Rank: Newbie

Groups: Guest
Joined: 9/1/2008(UTC)
Posts: 7

Fedor

I created a sample that does not use the GridView for clarity but does duplicate the issue. If you uncomment the UpdatePanel’s Triggers, the page will postback and show the image in the ModalPopup. Then comment out the PostBackTrigger and the image will not load.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Modal.aspx.cs" Inherits="ModalPopupExtenderTest.Modal" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxControlToolkit" %>
<%@ Register Assembly="Aurigma.GraphicsMill.AjaxControls" Namespace="Aurigma.GraphicsMill.AjaxControls" TagPrefix="aurigma" %>
<!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 runat="server">
<title>ModalPopupExtender Test</title>
<style type="text/css">
.modalBackground {
background-color:Gray;
filter:alpha(opacity=70);
opacity:0.7;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<%--!!! Uncomment Triggers to show image !!!--%>
<%--<Triggers>
<asp:PostBackTrigger ControlID="ButtonShowImage" />
</Triggers>--%>
<ContentTemplate>
<asp:Button ID="ButtonShowImage" runat="server" Text="Show Image" onclick="ButtonShowImage_Click" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="ButtonNone" runat="server" Style="display: none" />
<ajaxControlToolkit:ModalPopupExtender ID="ModalPopupExtenderImage" runat="server" TargetControlID="ButtonNone"
PopupControlID="PanelImage" DropShadow="false" CancelControlID="ButtonClose" BackgroundCssClass="modalBackground">
</ajaxControlToolkit:ModalPopupExtender>
<asp:Panel ID="PanelImage" runat="server">
<div align="right">
<asp:Button ID="ButtonClose" runat="server" Text="Close" OnClick="ButtonClose_Click" />
</div>
<aurigma:BitmapViewer ID="BitmapViewerImage" runat="server" ScrollBarsStyle="Auto" ZoomQuality="Low"
Height="500px" Width="500px" BorderWidth="5px" ViewportAlignment="CenterCenter"
BorderStyle="Solid" BorderColor="Blue">
</aurigma:BitmapViewer>
</asp:Panel>
</div>
</form>
</body>
</html>


using System;

namespace ModalPopupExtenderTest
{
public partial class Modal : System.Web.UI.Page
{
const string testImage = "C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Winter.jpg";
protected void Page_Load(object sender, EventArgs e)
{
PanelImage.Attributes.Add("style", "display:none");
}
protected void ButtonShowImage_Click(object sender, EventArgs e)
{
PanelImage.Attributes.Remove("style");
BitmapViewerImage.Bitmap.Load(testImage);
ModalPopupExtenderImage.Show();
}
protected void ButtonClose_Click(object sender, EventArgs e)
{
ModalPopupExtenderImage.Hide();
}

}
}

Thanks
Trey
Sergey Peshekhonov  
#4 Posted : Sunday, September 7, 2008 7:47:01 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Guest
Joined: 6/5/2007(UTC)
Posts: 57

Hello, tw3

Thank you for your sample. We have reproduced this issue and working on it. We will keep you updated.
Sincerely yours,
Sergey Peshekhonov.

Aurigma Technical Support Team.
Sergey Peshekhonov  
#5 Posted : Thursday, September 11, 2008 4:06:49 AM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Guest
Joined: 6/5/2007(UTC)
Posts: 57

Hello

Unfortunately we BitmapViewer does not support putting into ModalPopupExtender at this moment. As far as I understand, you just need to display image preview using ModalPopupExtender in AJAX. You may use the following workaround to do it.

Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Modal.aspx.cs" Inherits="Modal" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxControlToolkit" %>
<%@ Register Namespace="Aurigma.GraphicsMill.AjaxControls" Assembly="Aurigma.GraphicsMill.AjaxControls" TagPrefix="aurigma" %>
<!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>ModalPopupExtender Test</title>
	<style type="text/css">
	.modalBackground {
	background-color:Gray;
	filter:alpha(opacity=70);
	opacity:0.7;
	width: 500px;
	height: 500px;
	position: absolute;
	}
	</style>
</head>
<body>
	<form id="form1" runat="server">
		<asp:ScriptManager ID="ScriptManager1" runat="server">
		</asp:ScriptManager>
		<div>
			<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
				<%--!!! Uncomment Triggers to show image !!!--%>
				<%--<Triggers>
					<asp:PostBackTrigger ControlID="ButtonShowImage" />
				</Triggers>--%>
				<ContentTemplate>
					<asp:Button ID="ButtonShowImage" runat="server" Text="Show Image" onclick="ButtonShowImage_Click" />
					<asp:Button ID="ButtonNone" runat="server" Style="display: none" />
					<ajaxControlToolkit:ModalPopupExtender ID="ModalPopupExtenderImage" runat="server" TargetControlID="ButtonNone"
						PopupControlID="PanelImage" DropShadow="false" CancelControlID="ButtonClose" BackgroundCssClass="modalBackground">
					</ajaxControlToolkit:ModalPopupExtender>
					<asp:Panel ID="PanelImage" Width=500 Height=500 runat="server">
						<div align="right">
							<asp:Button ID="ButtonClose" runat="server" Text="Close" OnClick="ButtonClose_Click" />
						</div>
						<asp:Image Visible="false" runat="server" ID="Image1" />
					</asp:Panel>
				</ContentTemplate>
			</asp:UpdatePanel>	
		</div>
	</form>
</body>
</html>


Code:

using System;

public partial class Modal : System.Web.UI.Page
{
	const string testImage = "test.jpg";
	protected void Page_Load(object sender, EventArgs e)
	{
	}
	protected void ButtonShowImage_Click(object sender, EventArgs e)
	{
		using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap())
		{
			bitmap.LoadThumbnail(MapPath(testImage), 500, 0);
			Aurigma.GraphicsMill.AjaxControls.FileCache fc = Aurigma.GraphicsMill.AjaxControls.FileCache.GetInstance();
			string fileName = fc.GetPublicTempFileName(".jpg");
			bitmap.Save(fc.GetAbsolutePublicCachePath(fileName));
			Image1.Visible = true;
			Image1.ImageUrl = fc.GetRelativePublicCachePath(fileName);
		}
		ModalPopupExtenderImage.Show();
	}
	protected void ButtonClose_Click(object sender, EventArgs e)
	{
		ModalPopupExtenderImage.Hide();
	}
}


I hope this will help you. If you have some problems, please, feel free to contact us.
Sincerely yours,
Sergey Peshekhonov.

Aurigma Technical Support Team.
tw3  
#6 Posted : Sunday, September 14, 2008 10:01:19 AM(UTC)
tw3

Rank: Newbie

Groups: Guest
Joined: 9/1/2008(UTC)
Posts: 7

But you loose the functionality of the control and you can't zoom, pan etc...

So what does that solve, I could just use an image and accomplish the same?
Dmitry  
#7 Posted : Tuesday, September 16, 2008 9:14:02 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

I realize that is it serious issue. This problem is related to browser features: we get it worked in IE but it does not work in Firefox. The only way is not to use BitmapViewer in ModalPopup now.

We will continue to work on a solution and do our best to fix it in one of the future releases.

Edited by user Tuesday, September 16, 2008 9:16:43 PM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
tw3  
#8 Posted : Tuesday, September 16, 2008 10:42:47 PM(UTC)
tw3

Rank: Newbie

Groups: Guest
Joined: 9/1/2008(UTC)
Posts: 7

Dmitry

Do you have a time frame for a fix as this is casing the post back is causing other issues for me and not allowing me to move forward with the application I am developing?

Also, can you notify me of a fix?

Thank you
Dmitry  
#9 Posted : Wednesday, September 17, 2008 6:41:29 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Unfortunately at this moment I am not ready to tell you how much time it will require to fix this issue.

If you checked "I want to get updates from Aurigma" while you registered on our site, you will get the notification via email.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Guest (6)
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.