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.