Click here to Skip to main content
       

ASP.NET

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: multilanguage applicationmvpSandeep Mewara27 Feb '13 - 6:28 
AFAIK, Generally there isn't much difference (specially from translation prospective), here: http://en.wikipedia.org/wiki/Comparison_of_American_and_British_English[^]
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]: Sandeep Mewara's Tech Journal!
[My Latest Article]: HTML5 Quick Start Web Application

GeneralRe: multilanguage applicationmemberMember 870181327 Feb '13 - 16:10 
so u say english[UK] and english[US] are same from translation perspective ....similarly french[france] and french[canada] are same?thanks for ur immediate response...
Questions/m has to send mail on button click eventmemberMember 870181318 Feb '13 - 5:24 
<system.net>
    <mailSettings>
      <smtp from="development@relone.com">
        <network host="mail.relone.com" port="16" userName="development@relone.com" password="password" defaultCredentials="false" />
      </smtp>
    </mailSettings>
  </system.net>
this is my web.config setting.actually system has to send mail on button click event."from mail id" is development@relone.com .i vil get "to mail id" from db.what statement do i have to write on code behind to get this default address.pls help me
AnswerRe: s/m has to send mail on button click eventmvpSandeep Mewara18 Feb '13 - 5:57 
Try something like:
public static void CreateTestMessage(string emailIdFromDatabase)
{
	MailAddress to = new MailAddress("development@relone.com");
	MailAddress from = new MailAddress(emailIdFromDatabase);
	MailMessage message = new MailMessage(from, to);
	message.Subject = "Using the new SMTP client.";
	message.Body = @"Using this new feature, you can send an e-mail message from an application very easily.";
	// Use the application or machine configuration to get the 
	// host, port, and credentials.
	SmtpClient client = new SmtpClient();
	Console.WriteLine("Sending an e-mail message to {0} at {1} by using the SMTP host={2}.",
		to.User, to.Host, client.Host);
try {
	  client.Send(message);
	}
	catch (Exception ex) {
	  Console.WriteLine("Exception caught in CreateTestMessage(): {0}", 
            ex.ToString() );			  
  }
}
For a Web application, the parameterless constructor of SmtpClient reads its configuration from the web.config configuration file.
Refer: MSDN: SmtpClient Constructor[^]
 
For more details on sending email, have a look at this Microsoft Video tutorial:
Video: Use ASP.NET to send Email from Website[^]
Tutorials on sending Email in ASP.NET[^]
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]: Sandeep Mewara's Tech Journal!
[My Latest Article]: HTML5 Quick Start Web Application

GeneralRe: s/m has to send mail on button click eventmemberMember 870181318 Feb '13 - 6:42 
SmtpServer.Host = SMTPHost;
        SmtpServer.Port = SMTPPort;
        SmtpServer.Credentials = new NetworkCredential(CredentialEmailId, CredentialPassword);
        SmtpServer.DeliveryMethod = SmtpDeliveryMethod.Network;
could u tell me why the above lines of code is used;what should i write fr smtphost,smtpPort,credentialemailid & credentialpassword.
from now onwards i won't repost.
Console.WriteLine("Sending an e-mail message to {0} at {1} by using the SMTP host={2}.",
        to.User, to.Host, client.Host);
 
i am unable to understand the above statement.pls don't mind i am new to asp.net.
thanks
GeneralRe: s/m has to send mail on button click eventmvpSandeep Mewara18 Feb '13 - 6:49 
Member 8701813 wrote:
SmtpServer.Port = SMTPPort;
SmtpServer.Credentials = new NetworkCredential(CredentialEmailId, CredentialPassword);
SmtpServer.DeliveryMethod = SmtpDeliveryMethod.Network;

Not sure where from you picked it as I did not suggested so in my snippet. Moving on, having these lines is not an issue - only difference is, this is runtime defining the parameters needed, which otherwise could be picked from web.config file. Defining them at any one place is good enough. Keep config entry you shared in original question OR keep current above lines with values as was filled in config.
 

Member 8701813 wrote:
i am unable to understand the above statement

You can ignore/comment them. It was kind of logging to see what happened, not necessary for sending email.
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]: Sandeep Mewara's Tech Journal!
[My Latest Article]: HTML5 Quick Start Web Application

GeneralRe: s/m has to send mail on button click eventmemberMember 870181318 Feb '13 - 7:26 
http://csharpdotnetfreak.blogspot.com/2009/10/send-email-with-attachment-in-aspnet.html[^]
i referred this link..
Questionsending mail on button click event from the s/mmemberMember 870181318 Feb '13 - 5:15 







these are my mai settings.when i click on button i have to get this address.this is from mail id.i vil get "to mail id from db.getting mail id from db is not a pbm.my pbm is how to get this development@relone.com .actually system has to send mail on button click event
pls help me
AnswerRe: sending mail on button click event from the s/mmvpSandeep Mewara18 Feb '13 - 6:00 
Next time onwards, please don't repost. If needed, you can use 'Edit' link to edit your question.
 
For now, I have already replied you here: http://www.codeproject.com/Messages/4498677/Re-s-m-has-to-send-mail-on-button-click-event.aspx[^]
Sandeep Mewara
Microsoft ASP.NET MVP 2012 & 2013

[My Blog]: Sandeep Mewara's Tech Journal!
[My Latest Article]: HTML5 Quick Start Web Application

QuestionUsing Ajax in my projectmemberjaveed03518 Feb '13 - 3:32 
Hi,
 
I am having gridview and in that edit and view map buttons are present. i am using model popup for dispalying the data when user clicks on edit, like wise if i user clicks on view map i need to load the google maps with related markers.i am using updatepanel to stop the page refresh.
 
Now i am facing the issue while loading the google maps.at first time when page loads the map is loading properly when i click on the view map next time the map loads at the corner of the modelpopup ... can u me the solution for this.. why it is loading like this... i am researching this from so many days....
 
please give me reply as soon as possible whether the update panel is stooping the refreshing of google maps...

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


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid