Click here to Skip to main content
15,902,939 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralTrouble using window.print() Pin
Hakmeh Mohannad6-Apr-08 21:47
Hakmeh Mohannad6-Apr-08 21:47 
GeneralRe: Trouble using window.print() Pin
eyeseetee6-Apr-08 21:59
eyeseetee6-Apr-08 21:59 
GeneralRe: Trouble using window.print() Pin
Hakmeh Mohannad6-Apr-08 22:06
Hakmeh Mohannad6-Apr-08 22:06 
GeneralRe: Trouble using window.print() Pin
eyeseetee6-Apr-08 22:22
eyeseetee6-Apr-08 22:22 
Questiontree node in datalist Pin
Sonia Gupta6-Apr-08 21:11
Sonia Gupta6-Apr-08 21:11 
GeneralRe: tree node in datalist Pin
Christian Graus6-Apr-08 22:26
protectorChristian Graus6-Apr-08 22:26 
GeneralDatagrid firing twice Pin
AlexeiXX36-Apr-08 19:47
AlexeiXX36-Apr-08 19:47 
GeneralRe: Datagrid firing twice Pin
Christian Graus6-Apr-08 19:48
protectorChristian Graus6-Apr-08 19:48 
GeneralRe: Datagrid firing twice Pin
AlexeiXX36-Apr-08 19:52
AlexeiXX36-Apr-08 19:52 
GeneralNetwork File Copying Pin
S. Ranganathan6-Apr-08 19:42
S. Ranganathan6-Apr-08 19:42 
GeneralRe: Network File Copying Pin
Christian Graus6-Apr-08 19:47
protectorChristian Graus6-Apr-08 19:47 
GeneralRe: Network File Copying Pin
S. Ranganathan6-Apr-08 20:04
S. Ranganathan6-Apr-08 20:04 
GeneralRe: Network File Copying Pin
Ashish Sehajpal6-Apr-08 20:12
Ashish Sehajpal6-Apr-08 20:12 
GeneralRe: Network File Copying Pin
S. Ranganathan6-Apr-08 20:27
S. Ranganathan6-Apr-08 20:27 
GeneralRe: Network File Copying Pin
Christian Graus6-Apr-08 21:27
protectorChristian Graus6-Apr-08 21:27 
Generalproblem in embedding images in .net Pin
Varun1236-Apr-08 19:14
Varun1236-Apr-08 19:14 
hi,i want to send an email,containing embedded images.i have written a code for it and that's what 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!!!!!!

this code works fine for outlook.but in gmail or yahoo,i cant c the picture.please help me where i am wrong.???
can u tell me the code please...its kind of important for my project
GeneralRe: problem in embedding images in .net Pin
Christian Graus6-Apr-08 19:21
protectorChristian Graus6-Apr-08 19:21 
GeneralRe: problem in embedding images in .net Pin
Varun1239-Apr-08 18:56
Varun1239-Apr-08 18:56 
Questionhow do execute the textbox script value at dynamically in .net with c# Pin
sugunavathysubramanian6-Apr-08 18:49
sugunavathysubramanian6-Apr-08 18:49 
AnswerRe: how do execute the textbox script value at dynamically in .net with c# Pin
Christian Graus6-Apr-08 19:22
protectorChristian Graus6-Apr-08 19:22 
GeneralAjax toolkit - Rating control Pin
AlexeiXX36-Apr-08 15:15
AlexeiXX36-Apr-08 15:15 
QuestionPassword verification,Security,Authentication,Authorization Pin
dotnetprogrammer19846-Apr-08 14:37
dotnetprogrammer19846-Apr-08 14:37 
GeneralRe: Password verification,Security,Authentication,Authorization Pin
Christian Graus6-Apr-08 14:46
protectorChristian Graus6-Apr-08 14:46 
QuestionHow to display categories and subcategories in links Pin
Nourdin Ali6-Apr-08 14:22
Nourdin Ali6-Apr-08 14:22 
GeneralRe: How to display categories and subcategories in links Pin
Christian Graus6-Apr-08 14:47
protectorChristian Graus6-Apr-08 14:47 

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.