473,804 Members | 4,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multi image printing using response.binary write

18 New Member
Hi,

I am trying to print multiple label images in case of ups multi label implementaion. The response i get in XML schema and from that i parsedout the label images and stored in an array and from that array i am trying to print the labels in to Response. So many images are there and i am getting only one image the rest are getting overwritten. Because of this i am not able to release the product. i searched a lot in the net but i havn't got a good result from there. Please help me out with this problem.

protected void Page_Load(objec t sender, EventArgs e)
{
int count = Convert.ToInt32 (Session["PkgCount"]);
for (int i = 0; i
{
Response.ClearC ontent();
Response.Conten tType = (string)Session["ContentTyp e"];
Encoding encoding = (Encoding)Sessi on["Encoding"];
if (encoding != null)
Response.Conten tEncoding = encoding;
object label = Session["LabelBuffe r" + i];
Type type = label.GetType() ;
int size = 0;
if (type == typeof(byte[]))
{
size = ((byte[])label).Length;
Response.Binary Write((byte[])label);

}
else
{
string temp = Utilities.ToStr ing(label);
size = temp.Length;
Response.Write( temp);

}
if (size == 0)
{
Response.Write( "Zero length label");
}

}
}
Nov 29 '06 #1
1 2178
Banfa
9,065 Recognized Expert Moderator Expert
...ping...
Dec 2 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1740
by: Tumurbaatar S. | last post by:
My ASP app dynamically retrieves from db and sends JPG images using Response.BinaryWrite(). And it seems work. The script sets image type as "Response.ContentType = 'image/JPEG';" But viewing image properties in IE returns Type and Size as 'Not available'. How to set these properties properly?
5
10031
by: Popoxinhxan | last post by:
HI guy I am working on the web application that required to display the chart image on the page. The process is clicking the button and browser will popup another windows that displayed the
3
2222
by: RobertH | last post by:
Hello all. I have been hacking away trying to get a SQL image (jpeg) to render in a control or table row Without using the Response.BinaryWrite.... I think i might be on the verge but need a little help.. below are 2 functions that i wrote to try and accomplish this. the first one is what i would LIKE to do the 2nd one works but it's not what i want to do.. here's the code :
1
2925
by: Charlie | last post by:
Hi: I'm uploading documents into a SQL Server Image field and using Response.BinaryWrite() to download or view them in the browser. Some doc types like Adobe Illustrator and Photoshop files will open correctly, but other like Word, Excel and Powerpoint are corrupt. Here is code fragment to upload: // Get file in byte array int fileLen = this.TextBoxFileToUpload.PostedFile.ContentLength;
5
1470
by: Neo Geshel | last post by:
I still have a problem displaying images from an access DB using asp.net. This showimage.aspx is for an admin site. I need to pull the correct image from the correct table, hence the two GET variables I need to re-size the image, while keeping the proper proportions, on the fly (before it gets to the browser). The images in the DB need to be full size for the actual web site; thumbnails are only needed in the admin site, hence the two...
1
1709
by: developers | last post by:
Hello Every One , I need Help in inserting the user image in my data base. but unfortunatly I don't know how.I'm using asp with sql server. I tried to insert the image and i geuss it worked.for the field in the db in not null and it have this value <Binary> . but when i try to select it in gives me this error "An unhandled data type was encountered". this is my code : To insert the image sql="insert into users_img (user_image,user_id)...
23
5953
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine on most machines, on some machines I experience this problem: When loading the page a window pops up that asks if I want to open the document show_page.asp. When I click "Open" Interdev pops up and opens up a
2
2292
by: Chris3000 | last post by:
All i wanna do is simple, I wanna display an image from an access database. I try alot of things to no result. Like ascii code or nothing but a blank image with a red 'X'. Here is the code : <% set conn=server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.jet.oledb.4.0" conn.Open(server.MapPath("test1.mdb"))
0
1653
by: bananularstyle | last post by:
Hi everyone, This is an issue I have been picking away at for the past two weeks and am running short of ideas. :-\ I am writing an ASP page that allows a user to open/save a tif image stored on SQL Server. The user triggers the download by clicking a hyperlink which loads getAttachment.asp (code listed below). GetAttachment.asp connects to SQL Server through an ODBC and attempts to download the specified tiff using BinaryWrite(). It...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10577
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10320
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9150
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.