Monday, March 26, 2012
HTML File Uploader
I have recently developed a few sites with an uploader
facility for images and all has worked perfectly, until
now?
I re-installed .NET due to an unrelated problem and since
then if I use a WebServer Button control to submit the
form I have nothing within the Html uploader component
it's 'null'??
If I use a HTML submit button things work ok, this never
happended before does anyone have any ideas whats
happended, or what I'm doing wrong??
Regards
AndyHi Andy,
Thank you for posting to the MSDN newsgroups.
Based on my research and experience, please test the sample in the
following articles on your side.
HOW TO: Upload a File to a Web Server in ASP.NET by Using Visual C# .NET
http://support.microsoft.com/defaul...kb;EN-US;323246
HOW TO: Upload a File to a Web Server in ASP.NET by Using Visual Basic .NET
http://support.microsoft.com/defaul...kb;EN-US;323245
If you can reproduce the same problem, please tell me how to reproduce the
problem step by step on my side. I certainly appreciate your time.
If I have misunderstood your concern, please feel free to let me know.
Best regards,
Jacob Yang
Microsoft Online Partner Support
Get Secure! C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Hi thanks
I will review that article, I have made my code work by
using a normal image and putting some JavaScript behind
it to submit the form by code.
Incidentally the sites all work perfectly in their old
guise on my website!!!
Regards
Andy
>--Original Message--
>Hi Andy,
>Thank you for posting to the MSDN newsgroups.
>Based on my research and experience, please test the
sample in the
>following articles on your side.
>HOW TO: Upload a File to a Web Server in ASP.NET by
Using Visual C# .NET
>http://support.microsoft.com/default.aspx?scid=kb;EN-
US;323246
>HOW TO: Upload a File to a Web Server in ASP.NET by
Using Visual Basic .NET
>http://support.microsoft.com/default.aspx?scid=kb;EN-
US;323245
>If you can reproduce the same problem, please tell me
how to reproduce the
>problem step by step on my side. I certainly appreciate
your time.
>If I have misunderstood your concern, please feel free
to let me know.
>Best regards,
>Jacob Yang
>Microsoft Online Partner Support
>Get Secure! C www.microsoft.com/security
>This posting is provided "as is" with no warranties and
confers no rights.
>.
Saturday, March 24, 2012
html email with embedded images
I know how to send emails from the .Net environment, even html mails.
But, what is the best way to add images to the html?
A URL to an image somewhere on some server is usually blocked nowadays,
so you need to send the image as attachment. I had some success when I
used the filename (without path) of the attachment as img-src.
Is that the only way or are there better methods?
A related question: some of these images might be stored in the database
or generated "on the fly", but the MailAttachment class uses filenames.
Is there any way to attach some document *without* storing it first?
If not, can I safely delete that temporary file directly after I send the
email to the server?
Hans KestingI don't believe you can embed images into an email with the .net mail.
I also have to send out email's with embedded images that came from a
database. I basically had to write my own SMTP client to replace the built
in .net version. You can also purchase a 3rd party package that will do
this. (I couldn't since our product is resold and it would cause licencing
issues)
Unfortunally I can't send my code...they would probably fire me! But I can
offer you a few pointers on what you should do. Writing you're own SMTP
client isn't as easy as it sounds...there's a lot of standards to follow.
I strongly recommend that you use a 3rd party package...maybe this:
http://www.quiksoft.com/emdotnet/comparison.asp
"Hans Kesting" <news.2.hansdk@.spamgourmet.com> wrote in message
news:OZp%23JhRsEHA.160@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I know how to send emails from the .Net environment, even html mails.
> But, what is the best way to add images to the html?
> A URL to an image somewhere on some server is usually blocked nowadays,
> so you need to send the image as attachment. I had some success when I
> used the filename (without path) of the attachment as img-src.
> Is that the only way or are there better methods?
> A related question: some of these images might be stored in the database
> or generated "on the fly", but the MailAttachment class uses filenames.
> Is there any way to attach some document *without* storing it first?
> If not, can I safely delete that temporary file directly after I send the
> email to the server?
> Hans Kesting
>
html email with embedded images
I know how to send emails from the .Net environment, even html mails.
But, what is the best way to add images to the html?
A URL to an image somewhere on some server is usually blocked nowadays,
so you need to send the image as attachment. I had some success when I
used the filename (without path) of the attachment as img-src.
Is that the only way or are there better methods?
A related question: some of these images might be stored in the database
or generated "on the fly", but the MailAttachment class uses filenames.
Is there any way to attach some document *without* storing it first?
If not, can I safely delete that temporary file directly after I send the
email to the server?
Hans KestingI don't believe you can embed images into an email with the .net mail.
I also have to send out email's with embedded images that came from a
database. I basically had to write my own SMTP client to replace the built
in .net version. You can also purchase a 3rd party package that will do
this. (I couldn't since our product is resold and it would cause licencing
issues)
Unfortunally I can't send my code...they would probably fire me! But I can
offer you a few pointers on what you should do. Writing you're own SMTP
client isn't as easy as it sounds...there's a lot of standards to follow.
I strongly recommend that you use a 3rd party package...maybe this:
http://www.quiksoft.com/emdotnet/comparison.asp
"Hans Kesting" <news.2.hansdk@.spamgourmet.com> wrote in message
news:OZp%23JhRsEHA.160@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I know how to send emails from the .Net environment, even html mails.
> But, what is the best way to add images to the html?
> A URL to an image somewhere on some server is usually blocked nowadays,
> so you need to send the image as attachment. I had some success when I
> used the filename (without path) of the attachment as img-src.
> Is that the only way or are there better methods?
> A related question: some of these images might be stored in the database
> or generated "on the fly", but the MailAttachment class uses filenames.
> Is there any way to attach some document *without* storing it first?
> If not, can I safely delete that temporary file directly after I send the
> email to the server?
> Hans Kesting
Html email and embedded images.
If so can you post an example.
Thanks
Ok now I know it is not possible without a component. Is there a freecomponent around that lets you imbed images in to html emails?
HTML Email
I am using the system.net.mail class to send out email in HTML
format. I have a few images in the HTML page. In order to have the
images display without referencing the server, attaching the images to
the email and calling the image like - '<img src='email2.jpg'> works
fine to me (atleast in an internal network).
I keep reading in the posts that when an email is sent to
yahoo/hotmail accnt, the images does not show up. I believe, it is an
option/setup thing? Let me know if i am wrong or missing something.
I am trying to find if I can test this on a external mail server
(just to make sure it actually works). It would be great if anybody has
any pointers? I was unable to find a mail server which accepts a mail
generated programmatically. I understand it is got to do with open
relays.
Thanks,
Sam
HTML Email
I am using the system.net.mail class to send out email in HTML
format. I have a few images in the HTML page. In order to have the
images display without referencing the server, attaching the images to
the email and calling the image like - '<img src='http://pics.10026.com/?src=email2.jpg'works
fine to me (atleast in an internal network).
I keep reading in the posts that when an email is sent to
yahoo/hotmail accnt, the images does not show up. I believe, it is an
option/setup thing? Let me know if i am wrong or missing something.
I am trying to find if I can test this on a external mail server
(just to make sure it actually works). It would be great if anybody has
any pointers? I was unable to find a mail server which accepts a mail
generated programmatically. I understand it is got to do with open
relays.
Thanks,
Sam