Click here to Skip to main content
15,914,111 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Javascript error Pin
samerh4-Apr-08 1:11
samerh4-Apr-08 1:11 
Generalglobal.asax Pin
ajau3-Apr-08 21:44
ajau3-Apr-08 21:44 
GeneralRe: global.asax Pin
N a v a n e e t h3-Apr-08 22:21
N a v a n e e t h3-Apr-08 22:21 
GeneralUrgent: Database not updated Pin
guardianhm3-Apr-08 21:37
guardianhm3-Apr-08 21:37 
GeneralRe: Urgent: Database not updated Pin
N a v a n e e t h3-Apr-08 22:01
N a v a n e e t h3-Apr-08 22:01 
GeneralUpdate dyndns Pin
~V~3-Apr-08 21:31
~V~3-Apr-08 21:31 
GeneralRe: Update dyndns Pin
~V~4-Apr-08 0:35
~V~4-Apr-08 0:35 
GeneralProblem Opening embedded images in gmail Pin
Varun1233-Apr-08 21:22
Varun1233-Apr-08 21:22 
hi all.i have developed this application to send email via ASP.Net(C#.net).now if i embedd an image using CID,the image is visible in outlook,but not in GMAIL,or Yahoomail even if i click to show picture.this,i guess is because the path of the image i am providing is of my system.and other systems can not access this path?the image dat i am embedding is not on the internet but its only at my system.so that means i cant provide any URL too.i dont want to send this image as attachment.i need to embedd it only.and i want it to be visible on Gmail or Yahoomail too..how can i do it?following is the code that i have written:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Net.Mail;

public partial class _Default : System.Web.UI.Page
{


protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnSubmit_Click(object sender, EventArgs e)
{
string fileName = FileUploadReciepent.PostedFile.FileName;
fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1);
string filePath = Server.MapPath(".") + fileName;
FileUploadReciepent.PostedFile.SaveAs(filePath);
ExcelReader reader = new ExcelReader(filePath); //Create an Excel file Reader
reader.setCurrentWorksheet(1); //Set current worksheet as 1
Array al = reader.getRange("A1", "A3"); //Get A1 to A3 from worksheet 1

foreach (object cell in al) //Loop through all the cells
{
TxtTo.Text += cell + ",";
MailMessage message = new MailMessage();
message.From = new MailAddress(txtName.Text);
message.To.Add(TxtReceipent.Text);
message.Subject = txtsubject.Text;
message.IsBodyHtml = true;
message.Body = Literal1.Text;
LinkedResource image = new LinkedResource("C:\\My Documents\\My Pictures\\anything.jpg");
image.ContentId = "anything";
//add the LinkedResource to the appropriate view
//htmlView.LinkedResources.Add(image);
SmtpClient client = new SmtpClient("smtp.xxx.com");
client.Host = "xxx.xxx.xxx.xxx";
client.Send(message);
}
}

protected void BtnUpload_Click(object sender, EventArgs e)
{
TextReader a = new StreamReader(FileUploadContent.FileContent);
Literal1.Text = a.ReadToEnd();
}


}

FileUploadReciepent-file upload control that gets all the email ida from my excel sheet.
fileUploadContent-uploads the html content,with embedded image from my system.
I have searched all over the internet,but couldnt find any solution.hope u'll help me finding One!!!!!!
GeneralRe: Problem Opening embedded images in gmail Pin
Declan Bright4-Apr-08 0:56
Declan Bright4-Apr-08 0:56 
GeneralRe: Problem Opening embedded images in gmail Pin
Varun1234-Apr-08 17:58
Varun1234-Apr-08 17:58 
GeneralQuestion about controls and assemblies Pin
kontax3-Apr-08 21:22
kontax3-Apr-08 21:22 
GeneralRe: Question about controls and assemblies Pin
Declan Bright4-Apr-08 0:09
Declan Bright4-Apr-08 0:09 
Questionhow to capture the id of linkbutton Pin
mukkanti0073-Apr-08 21:08
mukkanti0073-Apr-08 21:08 
AnswerRe: how to capture the id of linkbutton Pin
Rocky#3-Apr-08 21:13
Rocky#3-Apr-08 21:13 
QuestionWriting SelectedItemTemplate to select items in DataList control Pin
Chesnokov Yuriy3-Apr-08 21:07
professionalChesnokov Yuriy3-Apr-08 21:07 
Generalmultiple excel sheet [modified] Pin
sanaja3-Apr-08 20:38
sanaja3-Apr-08 20:38 
GeneralDynamically populating a dropdown list in ASP.Net Pin
Shikha12343-Apr-08 19:56
Shikha12343-Apr-08 19:56 
GeneralRe: Dynamically populating a dropdown list in ASP.Net Pin
That's Aragon3-Apr-08 20:35
That's Aragon3-Apr-08 20:35 
GeneralDynamically Bind ID and Name to Link Button in Datalist Pin
sjs4u3-Apr-08 19:50
sjs4u3-Apr-08 19:50 
AnswerRe: Dynamically Bind ID and Name to Link Button in Datalist [modified] Pin
ashok@techxygen4-Apr-08 1:59
ashok@techxygen4-Apr-08 1:59 
Generalmake Pin
Mohammmed Farooq3-Apr-08 19:48
Mohammmed Farooq3-Apr-08 19:48 
QuestionDeleting folder Pin
Soumini Ramakrishnan3-Apr-08 19:32
Soumini Ramakrishnan3-Apr-08 19:32 
GeneralRe: Deleting folder Pin
Soumini Ramakrishnan4-Apr-08 1:47
Soumini Ramakrishnan4-Apr-08 1:47 
QuestionHow to Spell a Number Pin
saini arun3-Apr-08 10:49
saini arun3-Apr-08 10:49 
AnswerRe: How to Spell a Number Pin
pmarfleet3-Apr-08 10:57
pmarfleet3-Apr-08 10:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.