Click here to Skip to main content
15,847,427 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Datagrid firing twice Pin
AlexeiXX36-Apr-08 20:52
AlexeiXX36-Apr-08 20:52 
GeneralNetwork File Copying Pin
S. Ranganathan6-Apr-08 20:42
S. Ranganathan6-Apr-08 20:42 
GeneralRe: Network File Copying Pin
Christian Graus6-Apr-08 20:47
protectorChristian Graus6-Apr-08 20:47 
GeneralRe: Network File Copying Pin
S. Ranganathan6-Apr-08 21:04
S. Ranganathan6-Apr-08 21:04 
GeneralRe: Network File Copying Pin
Ashish Sehajpal6-Apr-08 21:12
Ashish Sehajpal6-Apr-08 21:12 
GeneralRe: Network File Copying Pin
S. Ranganathan6-Apr-08 21:27
S. Ranganathan6-Apr-08 21:27 
GeneralRe: Network File Copying Pin
Christian Graus6-Apr-08 22:27
protectorChristian Graus6-Apr-08 22:27 
Generalproblem in embedding images in .net Pin
Varun1236-Apr-08 20:14
Varun1236-Apr-08 20: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 20:21
protectorChristian Graus6-Apr-08 20:21 
GeneralRe: problem in embedding images in .net Pin
Varun1239-Apr-08 19:56
Varun1239-Apr-08 19:56 
Questionhow do execute the textbox script value at dynamically in .net with c# Pin
sugunavathysubramanian6-Apr-08 19:49
sugunavathysubramanian6-Apr-08 19:49 
AnswerRe: how do execute the textbox script value at dynamically in .net with c# Pin
Christian Graus6-Apr-08 20:22
protectorChristian Graus6-Apr-08 20:22 
GeneralAjax toolkit - Rating control Pin
AlexeiXX36-Apr-08 16:15
AlexeiXX36-Apr-08 16:15 
QuestionPassword verification,Security,Authentication,Authorization Pin
dotnetprogrammer19846-Apr-08 15:37
dotnetprogrammer19846-Apr-08 15:37 
GeneralRe: Password verification,Security,Authentication,Authorization Pin
Christian Graus6-Apr-08 15:46
protectorChristian Graus6-Apr-08 15:46 
QuestionHow to display categories and subcategories in links Pin
Nourdin Ali6-Apr-08 15:22
Nourdin Ali6-Apr-08 15:22 
GeneralRe: How to display categories and subcategories in links Pin
Christian Graus6-Apr-08 15:47
protectorChristian Graus6-Apr-08 15:47 
GeneralRe: How to display categories and subcategories in links Pin
Nourdin Ali7-Apr-08 6:09
Nourdin Ali7-Apr-08 6:09 
GeneralRe: How to display categories and subcategories in links Pin
Christian Graus7-Apr-08 12:44
protectorChristian Graus7-Apr-08 12:44 
QuestionWhere to set UICulture? InitCulture() causes trouble. Pin
horc6-Apr-08 11:00
horc6-Apr-08 11:00 
GeneralRe: Where to set UICulture? InitCulture() causes trouble. Pin
AlexeiXX36-Apr-08 16:19
AlexeiXX36-Apr-08 16:19 
GeneralRe: Where to set UICulture? InitCulture() causes trouble. Pin
horc7-Apr-08 11:54
horc7-Apr-08 11:54 
GeneralRe: Where to set UICulture? InitCulture() causes trouble. Pin
AlexeiXX37-Apr-08 11:56
AlexeiXX37-Apr-08 11:56 
GeneralInheriting page from common page Pin
AlexeiXX36-Apr-08 10:22
AlexeiXX36-Apr-08 10:22 
GeneralRe: Inheriting page from common page Pin
Christian Graus6-Apr-08 12:31
protectorChristian Graus6-Apr-08 12:31 

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.