Button in Gridview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pbala
    New Member
    • Dec 2008
    • 37

    Button in Gridview

    I created one button field in Gridview in asp.net 3.5. I wish to send mails using the button bound with ("mailid"). How can i write the code for button?


    Thanks in advance
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    From Windows Forms applications everything you need is in the System.Net.Mail namespace.

    Anyone else know if that is that approach for ASP?

    Comment

    • sangam56
      New Member
      • Nov 2007
      • 68

      #3
      Hi pbla and tlhintoq,
      You could use a hyperlink and bind the email address to it so that clicking the link will open your desktop's default mail software. You can easily mailto:format gridview hyperlink to send email.

      Hope this helps. Please feel free to ask if the problem persists or if any futher help is required. Thanks. Happy Programming!

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        If the HTML mailto doesn't work for you and you'd like to send an email using your .NET code it's the same for web applications as it is for desktop applications...

        See this quick reference on how to send emails using .NET for more information.

        Comment

        • pbala
          New Member
          • Dec 2008
          • 37

          #5
          thank you, its working..... I sent mails to the receipients through the SMTP...

          Comment

          Working...