Hi,
I want to include a graphic made in file2 into file. File must first send a
value to file2 (with Response.Redire ct) which will be used for the graphic.
My problem is that only the graphic is rendered and not the content of
file1.
Thanks for help.
André
See how i did:
file1:
-----
Dim lit As LiteralControl
Dim frm As HtmlForm = Me.FindControl( "form1")
Dim l As New Label
l.Text = "this is the graphic"
frm.Controls.Ad d(l)
Response.Redire ct(String.Forma t("redirect2.as px?Item0={0}", 25))
lit = New LiteralControl( "<img src=""redirect2 .aspx""/>")
frm.Controls.Ad d(lit)
file2 (redirect2.aspx ):
----------------------
Dim item0 As String
item0 = Request.QuerySt ring("Item0")
Dim objBitmap As New Bitmap(200, 104)
Dim objGraphic As Graphics = Graphics.FromIm age(objBitmap)
Dim redBrush As New SolidBrush(Colo r.Red)
.....
Response.Conten tType = "image/gif"
objBitmap.Save( Response.Output Stream, ImageFormat.Gif ) 3 2128
Andre, I thought we'd already resolved this.
You must use an img tag to refer to the other page.
Response.Redire ct will not work.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider http://SteveOrr.net
"André" <hjhhb@ddwrot e in message
news:uh******** *****@TK2MSFTNG P02.phx.gbl...
Hi,
I want to include a graphic made in file2 into file. File must first send
a value to file2 (with Response.Redire ct) which will be used for the
graphic.
My problem is that only the graphic is rendered and not the content of
file1.
Thanks for help.
André
See how i did:
file1:
-----
Dim lit As LiteralControl
Dim frm As HtmlForm = Me.FindControl( "form1")
Dim l As New Label
l.Text = "this is the graphic"
frm.Controls.Ad d(l)
Response.Redire ct(String.Forma t("redirect2.as px?Item0={0}", 25))
lit = New LiteralControl( "<img src=""redirect2 .aspx""/>")
frm.Controls.Ad d(lit)
file2 (redirect2.aspx ):
----------------------
Dim item0 As String
item0 = Request.QuerySt ring("Item0")
Dim objBitmap As New Bitmap(200, 104)
Dim objGraphic As Graphics = Graphics.FromIm age(objBitmap)
Dim redBrush As New SolidBrush(Colo r.Red)
....
Response.Conten tType = "image/gif"
objBitmap.Save( Response.Output Stream, ImageFormat.Gif )
a redirect send a redirect header to the browser, which then does a new
request. you can not send content and a redirect. by default asp.net stops
running code (by aborting the thread) after sending the redirect header.
-- bruce (sqlwork.com)
"André" <hjhhb@ddwrot e in message
news:uh******** *****@TK2MSFTNG P02.phx.gbl...
Hi,
I want to include a graphic made in file2 into file. File must first send
a value to file2 (with Response.Redire ct) which will be used for the
graphic.
My problem is that only the graphic is rendered and not the content of
file1.
Thanks for help.
André
See how i did:
file1:
-----
Dim lit As LiteralControl
Dim frm As HtmlForm = Me.FindControl( "form1")
Dim l As New Label
l.Text = "this is the graphic"
frm.Controls.Ad d(l)
Response.Redire ct(String.Forma t("redirect2.as px?Item0={0}", 25))
lit = New LiteralControl( "<img src=""redirect2 .aspx""/>")
frm.Controls.Ad d(lit)
file2 (redirect2.aspx ):
----------------------
Dim item0 As String
item0 = Request.QuerySt ring("Item0")
Dim objBitmap As New Bitmap(200, 104)
Dim objGraphic As Graphics = Graphics.FromIm age(objBitmap)
Dim redBrush As New SolidBrush(Colo r.Red)
....
Response.Conten tType = "image/gif"
objBitmap.Save( Response.Output Stream, ImageFormat.Gif )
But there is a <imgtag refering to the other page in my code.
Now my problem is then: how to pass data to the graphic from page 1 and
getting the graphic back into page 1?
I used 'redirect' because in another thread in this group, they adviced me
to use 'redirect' to pass data to another page instead of cookies ...
Thanks again
"Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <St***@Orr.nets chreef in
bericht news:47******** *************** ***********@mic rosoft.com...
Andre, I thought we'd already resolved this.
You must use an img tag to refer to the other page.
Response.Redire ct will not work.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider http://SteveOrr.net
"André" <hjhhb@ddwrot e in message
news:uh******** *****@TK2MSFTNG P02.phx.gbl...
>Hi,
I want to include a graphic made in file2 into file. File must first send a value to file2 (with Response.Redire ct) which will be used for the graphic. My problem is that only the graphic is rendered and not the content of file1.
Thanks for help. André
See how i did:
file1: ----- Dim lit As LiteralControl Dim frm As HtmlForm = Me.FindControl( "form1") Dim l As New Label l.Text = "this is the graphic" frm.Controls.A dd(l)
Response.Redir ect(String.Form at("redirect2.a spx?Item0={0}", 25)) lit = New LiteralControl( "<img src=""redirect2 .aspx""/>") frm.Controls.A dd(lit)
file2 (redirect2.aspx ): ---------------------- Dim item0 As String item0 = Request.QuerySt ring("Item0")
Dim objBitmap As New Bitmap(200, 104) Dim objGraphic As Graphics = Graphics.FromIm age(objBitmap) Dim redBrush As New SolidBrush(Colo r.Red) ....
Response.Conte ntType = "image/gif" objBitmap.Save (Response.Outpu tStream, ImageFormat.Gif ) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Gary |
last post by:
I am having a strange problem that I cannot solve. I have an asp page that I use for a user to login and gain access to other pages. When the user logs in I set a couple of session variables like Session("UserType") = "Sales". Then based on the Session("UserType") I use response.redirect to take the user to a specific page. The logic and response.redirect works fine on a Win2k server but when I move the page to a server running Win2003 the...
|
by: WebHouse.Co |
last post by:
Hi Sir
I'm in my 2nd year in M.Sc. degree & I made a project about the
powerful tools SQLXML 3.0 & updategram, so I made a list of programs
which r they so similar to the example that using updategram with ASP
That exist in the documentation of the Microsoft SQL Server XML Tools
as the following page:
Sample ASP Application
|
by: Andrew |
last post by:
Hey all,
Working on revamping our Intranet here and making use of the LDPA, Active
Directory, Directory Services, etc. that .Net provides. I am still fairly
new on this subject, so the problem I have run into I am not sure how to
fix, and really not sure what is causing it.
Here's what is going on (test server - Windows 2003 Server):
I have a page in a folder (under anonymous authentication in IIS6) that has
a link on it that...
|
by: Steve Peterson |
last post by:
Hi
I have an .aspx web form in which I would like to output only XML, no HTML.
The datasource is a datatable that's bult on the fly based on user input
from previous .aspx page so the XML output has to be genereated in the code
behind.
I was wondering if there is an elegant way of doing this in .NET using the
..NET classes...
|
by: Jeronimo Bertran |
last post by:
Hello,
I am using a rendering aspx page to display a database image on an Image
control. When the database record is retrieved, I am saving the bitmap
to a session variable for the rendering aspx to load. Here is the code
on the rendering page:
CODE FOR ImageForm.aspx
private void Page_Load(object sender, System.EventArgs e)
| |
by: A.M-SG |
last post by:
Hi,
Within my code behind's Page_Load event, I need to prevent the aspx contents
be rendered.
I tried to use Response.End() , but ASP.NET gives me
"System.Threading.ThreadAbortException" exception. I also tried
Response.OutputStream.Flush();
Response.OutputStream.Close();
|
by: Blasting Cap |
last post by:
I am using the following code to pull an image out of a database &
display it on a web page.
Dim data As New data
Dim sID As String = Request.Params("itemID")
Dim sqlConnection As New SqlConnection(data.connectionString)
Dim sqlCom As New SqlCommand("Select Data, Type From tblImageStorage
Where (Story_ID='" & sID & "')", sqlConnection)
Dim sqlDataReader As SqlDataReader
sqlConnection.Open()
|
by: ponvijaya |
last post by:
Hi all,
I have one requirement in my project. I need to download a file from the server tot the client machine. And after downloading it , it should be redirected to another jsp file.
The code for download write inside a servlet is as follows
public class DownloadServlet extends HttpServlet
{
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
|
by: shahidrasul |
last post by:
i want to download a file which user select from gridview, downloading is completing without problem but after download i want to refresh my page because i do some changes in db .
but when refresh.redirect() occure it give me error that
can't redirect because headers have been sent
following are my code to download file
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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,...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |