Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kvsreedhar

@kvsreedhar
About
Posts
27
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • converting .aspx pageinto .PDF
    K kvsreedhar

    anyone please help me I am designing program in which the program has to convert a pay slip generated (programatically) to .pdf . The thing is the data required for the form is taken from database and is captured in a PAY SLIP format(.aspx) , which is then convertd (the pay slip generated) to .PDF My questions are how to capture the screen (.aspx), containing the payslip generated , and convert into the .pdf ? can .aspx screenshot be converted to .pdf (pay slip) ?If no how do I convert the .aspx to .html (with the captured data from dtabase) , such that I can convert .html to .pdf (I have a third party software to convert .html to .pdf) may please help me any mistakes above may please excuse me :rose: Thanks in Advance :rose:

    Kovuru Sreedhar

    ASP.NET question html database help tutorial

  • mail attachment repeating
    K kvsreedhar

    :) thanks a lot it's working. :)

    Kovuru Sreedhar

    ASP.NET help csharp com

  • mail attachment repeating
    K kvsreedhar

    thanks for your replay but without using the loop how can i send to 3 persons with just one click?

    Kovuru Sreedhar

    ASP.NET help csharp com

  • mail attachment repeating
    K kvsreedhar

    Please anyone may help! I am trying a program to send a attachment(only one attachment) to 3 mail recepiants . After sending the mail (a success one) I am finding that the attachment sent to each of the recepient is attached thrice(same file is attached to the mail) whereas I am attaching only a single file. And more over I am getting the mail twice as if I clicked on the SEND button twice(infact I clicked only once). Please help me . I give my code as below :rose:thanks in advance :rose: protected void Button1_Click(object sender, EventArgs e) { string[] addresses = {"mailaddress1","mailaddress2","mailaddress3" }; SmtpClient smtpMail = new SmtpClient(); smtpMail.Host = "smtp.abc.com"; smtpMail.EnableSsl = true; MailMessage mail = new MailMessage(); mail.From = new MailAddress("abc@abc.com"); string fileName = Path.GetFullPath(FileUpload1.PostedFile.FileName); for (int i = 0; i < addresses.Length; i++) { if (FileUpload1.PostedFile != "") { try { mail.Attachments.Add(new Attachment(fileName)); } catch (Exception ex) { Response.Write(ex.Message); } } mail.To.Add(addresses[i]); Response.Write(addresses[i] + " "); mail.Subject = "HAI!!!!!!!"; mail.Body = "ATTACH TO ALL"; smtpMail.Credentials = new System.Net.NetworkCredential(username.Text, txtPassword.Text); try { smtpMail.Send(mail); Response.Write(" Mail Sent"); } catch (Exception ex) { Response.Write("Error " + ex.InnerException); Console.WriteLine(ex.InnerException); } } }//end of event click

    Kovuru Sreedhar

    ASP.NET help csharp com

  • Error while converting from ASP . NET to PDf
    K kvsreedhar

    thankyou for your consideration to my query may please suggest a solution so that I can access from any drive Thanks in Advance

    Kovuru Sreedhar

    ASP.NET help html sysadmin question

  • Error while converting from ASP . NET to PDf
    K kvsreedhar

    Anyone please help me I have a program which converts a .txt file to PDF file . I am getting the following error while running the program Error 'C:\Documents and Settings\........' is not a valid virtual path in ASP . NET I give my Code below ... code in button Click --------------------------- String fileName = ""; String strText = ""; // create instance of the PDF manager IPdfManager objPDF = new PdfManager(); // Create new document IPdfDocument objDoc = objPDF.CreateDocument(Missing.Value); // Add a page to document. Pages are intentionally small to demonstrate text spanning IPdfPage objPage = objDoc.Pages.Add(300, 300, Missing.Value); // use Arial font IPdfFont objFont = objDoc.Fonts["Arial", Missing.Value]; fileName = Path.GetFullPath(fileUpload1.PostedFile.FileName); try { strText = objPDF.LoadTextFromFile(Server.MapPath(fileName)); } catch (Exception ex) { Response.Write("error is "+ex.Message); } // Parameters: X, Y of upper-left corner of text box, Height, Width IPdfParam objParam = objPDF.CreateParam("x=10; y=290; width=280; height=280; html=true"); while (strText.Length > 0) { // DrawText returns the number of characters that fit in the box allocated. int nCharsPrinted = objPage.Canvas.DrawText(strText, objParam, objFont); // HTML tag generated by DrawText to reflect current font state String strHtmlTag = objPage.Canvas.HtmlTag; // The entire string printed? Exit loop. if (nCharsPrinted == strText.Length) break; // Otherwise print remaining text on next page objPage = objPage.NextPage; strText = strHtmlTag + strText.Substring(nCharsPrinted); } // Save document, the Save method returns generated file name String strFilename = objDoc.Save(Server.MapPath("mask.pdf"), false); lblResult.Text = "Success! Download your PDF file <A HREF=" + strFilename + ">here</A>"; ---------------------------- :rose: Thanks in Advance :rose:

    Kovuru Sreedhar

    ASP.NET help html sysadmin question

  • how to include one .aspx page into another .aspx page?
    K kvsreedhar

    can any one help me in this please I have a Main.aspx .I would like to include Login.aspx , Links.aspx pages into Main.aspx . How would it be done (without Master Pages ).In ASP we have the tag which include a file , say in a table cell. Like wise is it possible in ASP.NET? :rose: thanks in advance :rose:

    Kovuru Sreedhar

    ASP.NET csharp asp-net help tutorial question

  • getting full path name using FileUpload control's FileName property
    K kvsreedhar

    thanks for your valuable help.It really solved my problem.

    Kovuru Sreedhar

    ASP.NET help csharp visual-studio question

  • plz answer my questions,its vry urgent
    K kvsreedhar

    in that case make an array of all those required domains and validate on that array elements of omain names.I hope this will get you some idea.

    Kovuru Sreedhar

    ASP.NET csharp asp-net database

  • plz answer my questions,its vry urgent
    K kvsreedhar

    for your domain name validation in E-mail ... I think you can extract the domain name from the email address and validate against your domain name .try to use the substring functions available . extract the sub-string after @ from the e-mail (if it is e-mail to be validated) and validate it with your domain name. I feel this is a better way out . For eg. the email is abc@xyz.com and your domain name is www.xyz.com ,extract xyz.com from e-mail and validate it with the domain name .

    Kovuru Sreedhar

    ASP.NET csharp asp-net database

  • getting full path name using FileUpload control's FileName property
    K kvsreedhar

    so what if can answer answer it .right .

    Kovuru Sreedhar

    ASP.NET help csharp visual-studio question

  • getting full path name using FileUpload control's FileName property
    K kvsreedhar

    hello any one may please help me! is it not possible to get the full path using FileUpload control FileName property? I am asking this because when selected a file for uploading in C drive (C:\filename.ext) and when I click on send mail it shows an error saying that the file is not available in the path "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\...". :rose: thanks in advance :rose:

    Kovuru Sreedhar

    ASP.NET help csharp visual-studio question

  • getting full path name using FileUpload control's FileName property
    K kvsreedhar

    is it not possible to get the full path using FileUpload control FileName property? I am asking this because when selected a file for uploading in C drive (C:\filename.ext) and when I click on send mail it shows an error saying that the file is not available in the path "C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\...". may please help out me.

    Kovuru Sreedhar

    ASP.NET help csharp visual-studio question

  • E-Mailing in ASP .NET
    K kvsreedhar

    what are the possible keywords for spam mail?

    Kovuru Sreedhar

    ASP.NET csharp html sysadmin help

  • sending Email in C#
    K kvsreedhar

    :) you are Too Smart MB :)

    Kovuru Sreedhar

    ASP.NET csharp com sysadmin windows-admin help

  • E-Mailing in ASP .NET
    K kvsreedhar

    any one please help me I have the following code for Emailing . My doubt is I am able to send mail only to gmail(as a spam) but not to other mail like yahoo(not even as a spam) etc. What could be the reason .I have even configured web.config file and ....Relay->127.0.0.1 kindly help me :rose:Thanks in advance:rose: ----------> //create the mail message MailMessage mail = new MailMessage(); //set the addresses mail.From = new MailAddress(txtFrom .Text.Trim ()); mail.To.Add(txtTo.Text.Trim ()); //set the content mail.Subject = txtSubject .Text ; //first we create the Plain Text part AlternateView plainView = AlternateView.CreateAlternateViewFromString("Some Plain Text" , null, "text/plain"); //then we create the Html part AlternateView htmlView = AlternateView.CreateAlternateViewFromString("<b>"+txtBody .Text.Trim ()+"</b>", null, "text/html"); mail.AlternateViews.Add(plainView); mail.AlternateViews.Add(htmlView); //send the message SmtpClient smtp = new SmtpClient("127.0.0.1"); //specify the mail server address try { smtp.Send(mail); Response.Write("Mail Sent..."); txtBody.Text = ""; txtFrom.Text = ""; txtSubject.Text = ""; txtTo.Text = ""; } catch (Exception ex) { Response.Write (ex.ToString ()); } <---------->

    Kovuru Sreedhar

    ASP.NET csharp html sysadmin help

  • sending Email in C#
    K kvsreedhar

    :laugh: really I laughed on My Ignorance of the subject(App.Quit()). :laugh: Any how please help me with email .

    Kovuru Sreedhar

    ASP.NET csharp com sysadmin windows-admin help

  • sending Email in C#
    K kvsreedhar

    I would be more happy with your answer for Application.quit() :)

    Kovuru Sreedhar

    ASP.NET csharp com sysadmin windows-admin help

  • sending Email in C#
    K kvsreedhar

    literally I don't understand ur words . if u have ans to Application.Quit() pl. tell me.

    Kovuru Sreedhar

    ASP.NET csharp com sysadmin windows-admin help

  • sending Email in C#
    K kvsreedhar

    tried it but the same result . i even hard coded the mail address

    Kovuru Sreedhar

    ASP.NET csharp com sysadmin windows-admin help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups