471,582 Members | 1,351 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,582 software developers and data experts.

problem with cookies and graphics

Hi,

I try to insert a graphic (bitmap) to the first file. No problem any more
with that.
But the graphic generated in the second file (graf2.aspx) must receive
values from the the first file. I do that with
cookies. It works when i send ONE cookie, but if i send two cookies from the
first file, i get the browser-error: "can't render the page (or something
like that) ... check your configuration etc ...".

Maybe a conflict between the 'Response'?
Can you see the problem and maybe solve it?
Thanks
I show you my code:
first file:
-------
Dim cok1 As New HttpCookie("cok1")
Dim cok2 As New HttpCookie("cok2")
cok1.Value = 150
Response.Cookies.Add(cok1)
cok2.Value = 50
Response.Cookies.Add(cok2)
.....
lit = New LiteralControl("<img src=""graf2.aspx""/>")
frm.Controls.Add(lit)
.....

graf2.aspx
--------------------------------
Sub Page_Load(sender As Object, e As EventArgs)
Dim cok1 As New HttpCookie("cok1")
Dim cok2 As New HttpCookie("cok2")
Dim ja1, ja2 As String
Dim az,az2 As Integer
cok1 = Request.Cookies("cok1")
cok2 = Request.Cookies("cok2")
ja1 = cok1.Value
ja2 = cok2.Value
az = Convert.ToInt16(ja1) 'used in the graphic
az2 = Convert.ToInt16(ja2) 'used in the graphic
....
Dim objBitmap As New Bitmap(300, 200)
Dim objGraphic as Graphics = Graphics.FromImage(objBitmap)
Dim redBrush As New SolidBrush(Color.Red)
objGraphic.FillRectangle(whiteBrush, 0, 0, 300, 200)
etc ...
.......
end sub
Nov 29 '06 #1
0 826

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by BlackHawke | last post: by
reply views Thread by TJO | last post: by
reply views Thread by Ori | last post: by
2 posts views Thread by Netanel | last post: by
1 post views Thread by rushik | last post: by
7 posts views Thread by cmrchs | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

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.