Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 5th, 2006, 10:22 AM
Friend of Wrox
Join Date: Apr 2006
Location: , , .
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default how inserting more bitmap graphics in a page?


I made a webform for a survey, with multiple-choice questions. The results of each question are put into tables, one table per question, like:
values frequency
1 6
2 3
3 32
4 26
5 12

Now i want to add a graphic using the Namespace "System.Drawing" beside the table representing those values. So i
use two files, the second containing the code for the graphic.
I tried two ways: with a cookie (i know, not the best way) and with requeststring. Everything works, except that the second file has no time to create and render the graphic.
This happens in a loop: the first table is made, then the cookie or requeststring is sent together with the reference to file 2 where the graphic is created, then next table etc ...

My problem:
When using a cookie, each graphic appears beside its table in file 1 but all with the values of the last table (the value of the last send cookie).
When using a parameter, only the graphic of the last question is rendered (with the right values).

I thing it's a matter of speed: file 2 has no enough time to produce and send the graphic to file 1.
Any way to solve this?


My code:

file1: (with parameter)
'valtopass is the string containing the values to pass with ':' as separator
(e.g. 6:3:32:26:12)
 For j = 1 To numberoffield
'create table
 gr.ImageUrl = "graf2.aspx?v1=" & valtopass

file1: (with cookie)
'valtopass is the string containing the values to pass with ':' as separator
(e.g. 6:3:32:26:12)
'cok = HttpCookie
 For j = 1 To numberoffield
'create table

file2 (graphic)
Dim objBitmap As New Bitmap(40 * l, 124)
Response.ContentType = "image/gif"
objBitmap.Save(Response.OutputStream, ImageFormat.Gif)


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4: Page 394 - Inserting ScriptManager VeganMan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 April 17th, 2008 08:41 PM
Inserting "fileneme.swf" file into a page labelle ASP.NET 2.0 Basics 0 January 19th, 2007 11:24 AM
Inserting records to Oracle db from asp page jowjow Classic ASP Basics 0 April 4th, 2006 09:24 AM
inserting records in oracle from asp page jowjow Oracle ASP 0 April 4th, 2006 09:17 AM
Chapt 8 Try it out (Inserting).. Page 273 Robert Reno BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 4 February 9th, 2006 06:21 PM

All times are GMT -4. The time now is 11:06 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.