473,327 Members | 2,055 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,327 software developers and data experts.

Paste image from clip board to send via e-mail

Ben
Hi,

I am writing an aspx page which submits data via and e-mail. I want to allow
a user to paste and image from the clipboard (screen dump for example) and
then this image must either be saved to a database file or insterted in the
e-mail and sent (preferable method).

Any and all help to pointing me in the right direction is appreciated.

Ben.
Nov 19 '05 #1
2 1467
To get the file to the web server, use a HtmlFileInput control. In your aspx
page, put this:

<input type="file" runat="server" id="fileUploadControl">

Which should create this line in your code behind:

protected System.Web.UI.HtmlControls.HtmlInputFile fileUploadControl;

So, in your Page_Load (or somewhere else in code behind) you can do this:

if(Page.IsPostBack)
{
fileUploadControl.PostedFile.SaveAs(@"C:\test.txt" );
}

Now you have the file and you can do whatever you want with it. There are
also other methods on the PostedFile property to get the stream and do other
things, if saving to the web server is not what you want to do.

Hope this helps.

"Ben" wrote:
Hi,

I am writing an aspx page which submits data via and e-mail. I want to allow
a user to paste and image from the clipboard (screen dump for example) and
then this image must either be saved to a database file or insterted in the
e-mail and sent (preferable method).

Any and all help to pointing me in the right direction is appreciated.

Ben.

Nov 19 '05 #2
Unless you want to write a client-side ActiveX control or Java applet to do
this, it would be more easy to have the user save the image as a file and
then upload it with a FileUpload Control.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Ben" <Ad***********@tpc.co.tz> wrote in message
news:Of*************@TK2MSFTNGP12.phx.gbl...
Hi,

I am writing an aspx page which submits data via and e-mail. I want to
allow a user to paste and image from the clipboard (screen dump for
example) and then this image must either be saved to a database file or
insterted in the e-mail and sent (preferable method).

Any and all help to pointing me in the right direction is appreciated.

Ben.

Nov 19 '05 #3

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

Similar topics

3
by: Saku | last post by:
Greetings, I'm having problems with correct rendering of an aligned image and list items. The following test page demonstrates the issue: ----------clip---clap---clip---clap---------- <html>...
8
by: Jeff Thies | last post by:
I'm having trouble clipping an image. My understanding is that this is all I should need: <img src="test_img.jpg" style="clip: rect(10px 10px 10px 10px)" alt="alt"> Although I've seen this as...
2
by: Kimmo R. M. Hovi | last post by:
Currently I have defined: -- clip clip -- <form method="post" action="xx" enctype="application/x-www-form-urlencoded"> <input type="image" name="Function 1" src="image1.gif" border="0"...
15
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and...
1
by: Robert W. | last post by:
In my Winforms app I'm trying to get an image's background to appear transparent on a form that has a gradient background. So I added a PictureBox and then attempted to add a custom paint command...
2
by: Tor Inge Rislaa | last post by:
Coding, copy,clip and paste? How to write the code for copy, clip and paste for a VB.NET application T.I.Rislaa
0
by: jshoffner | last post by:
This sounds like a really silly question but I'm can't find a solution anywhere. I use the Search window within VS.NET 2003 all the time. However, when I find a sample that is usefull I would like...
0
by: atif283 | last post by:
Hi I m working on clip board application in vb.net and i need to paste file on window's desktop how i will do it can any one help me in this regard? Thankz in advance
5
cameokid
by: cameokid | last post by:
Can someone help me out with this. Here is what i am trying to do. I have an image of size 310x310. Initially i am displaying only 50x50 using clip property. Later using setTimeout property i am...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.