473,379 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How do I email an image with RenderControl

Hi, I am using RenderControl to send the contents of my aspx DataGrid,
etc. from my form. In this form there is an image. The image resides
on the server. It has a url of ./mypic.jpg. Because of this when the
email is generated the picture is not shown in the resulting email
(just gives the x as ./isn't on their computer). Everything else is
fine because it is just html. But what if I want binary data like the
image? How can I get that and email it? Thanks for any guidance.

Nov 19 '05 #1
3 1389
You have to use a fullly qualified URL for an image in an email. Search the
net for ASP.NET fully qualified URL. You're gonna want to do something with
the Request.ServerVariables["SERVER_NAME","SERVER_PORT", and/or
"SERVER_PORT_SECURE"]
Nov 19 '05 #2
The person receiving the email may not have access to the location. Is
there another way? GDI+?

Nov 19 '05 #3
the image is included in the mail body using Multipart/Related content
type, very simular to an attachement see the rfc:

ftp://ftp.ietf.org/rfc/rfc2387.txt

the exchange sdk supports this thru the AddReleatedBodyPart method.
-- bruce (sqlwork.com)
<ne***********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi, I am using RenderControl to send the contents of my aspx DataGrid,
etc. from my form. In this form there is an image. The image resides
on the server. It has a url of ./mypic.jpg. Because of this when the
email is generated the picture is not shown in the resulting email
(just gives the x as ./isn't on their computer). Everything else is
fine because it is just html. But what if I want binary data like the
image? How can I get that and email it? Thanks for any guidance.

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Greg Christie | last post by:
I think I have a somewhat unique situation here, so I thought I should post it for the few poor souls who run across it and try to google it like I did. First of all, I was getting the following...
8
by: John Scott | last post by:
I want to be able to put into the body of an email, the entire contents of a aspx page....with form fields filled out I know I could go through and get the values of all of the textboxes, radio...
2
by: George Ter-Saakov | last post by:
I am trying to wrap PlaceHolder so it will output prefix/suffix (like <div>, </div>) before render the actual control. So i created public class clsSection : PlaceHolder protected override...
5
by: tshad | last post by:
Is there a way to easily put a Datagrid in an email? I want to send a select result in the form of a Datagrid via an email to some of our clients. Thanks, Tom
2
by: wubin_98 | last post by:
Hi, I want to export a gridview data and a image from image control to export to an Excel document. When I executed following code, GridView data was exported to Excel properly. But no image...
2
by: manmit.walia | last post by:
Hello Fellow Developers, I have a small problem that you might be able to help me with. The method that I am trying to create is the ability to export a GridView and a image to word or excel. I...
2
by: CK | last post by:
Hello All, I am trying to extend the default asp:ImageButton to include an image for an enabled state and a second image for a disabled state. I currently did this by extending the ImageButton...
11
by: nuhura01 | last post by:
Hi.. I have a button to preview image using the following code, which preview the image in html page: Dim oStringWriter As System.IO.StringWriter = New System.IO.StringWriter Dim...
3
by: aSoundMind | last post by:
Hello Guys, I am not sure is this a common problem. I can't display image which in a gridview to excel or word. I have not try on pdf or web but surely this annoy me. I tried to google it and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.