Hi Check the following code SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage(); MailAddress fromAddress = new MailAddress(txtEmail.Text); smtpClient.Host = "mail.xyz.com"; smtpClient.Port = 25; message.From = fromAddress; message.To.Add("abc@xyz.com"); message.Subject = "put some subject"; message.IsBodyHtml = false; message.Body = "your body text"; smtpClient.Send(message); put this code under your send button event.
bhattiprolu
Posts
-
pop3 mail -
getting next xml node valuehi thanks Sebastian, Nut i didn't get how to get the next node value.
-
getting next xml node valuehi, thanks for the help. Actually i have a webpage which contains previous and next buttons. in the same page i have a frame where i have to change the value of the iframe src depending on the previous and next buttons. the value will be taken from XML node values. Please check the xml doc below. <?xml version="1.0" encoding="utf-8" ?> <portfolio> <portfolios id="0808"> <src link="http://www.yahoo.com"></src> </portfolios> <portfolios id="0809"> <src link="http://www.gmail.com"></src> </portfolios> <portfolios id="0810"> <src link="http://www.codeproject.com></src> </portfolios> <portfolios id="0811"> <src link="http://www.xyz.com"></src> </portfolios> </portfolio> and check my backend coding. protected void imgbtnNext_Click(object sender, ImageClickEventArgs e) { //string crnturl = Request.Url.ToString(); XmlDocument doc=new XmlDocument(); XmlNode root = doc.LastChild; if (root) { imgbtnNext.Enabled = false; } else { string myurl = Request.QueryString.Get("id").ToString(); XmlDataSource xsd = new XmlDataSource(); xsd.DataFile = "~/App_Data/portfolio.xml"; xsd.XPath = "portfolio/portfolios[@id='" + myurl + "']/src"; GridView ds = new GridView(); ds.DataSource = xsd; ds.DataBind(); iframeprojects.Attributes.Add("src", ds.Rows[0].Cells[0].Text.ToString()); } }
-
getting next xml node valuehi, i have next and previous buttons, when i click next i must get the next xml node value and if i click previous button it should display the previous node value. can anybody help in this regard. Thanks in advance.
-
Code conversion problemuse the following link http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx
-
athentication for windows applicationHi all, i am developing a windows application in which i want to give authentication for the user to login. Please help me how to give authentication in windows application. Regatds, Mohan
-
alert notificationHi all, here i am developing one website, in one page i have one application form if user fills the hal of the form and try to go to the next page then iwant to prompt a message saying "r u sure u want to leave the page" how to achiev this. Actually i have done the same thing for cancel button in the same page. if user trying to go to next page with out filling the page then how to achieve this. Thanks in advance
-
Cross browserHi all, I designed and developed one website in VS2005 and its working fine in IE but when i checked the same thing in Mozilla the alignment was totally gone!! and i used the css for desiging. can any body help me out solve this problem!! thanks in advance!
-
hello freindhttp://www.getdotnetcode.com/nexDotNet/030017AutobindDBToWinFormsApp\_VB2005/AutobindDBToWinFormsApp\_VB2005.htm check the link it may help u!!
-
Validationshey thanks for ur response! but there is no property called OnClick for dropdown list!!!
-
ValidationsThanks for reply... :) no its not working!!!! :(
-
Validationsactually thing is... i want to made a field is require as per the dropdownlist item selected. means if i select Email from my dropdown list the the Email field must become mandatory and phone field will be normal means not mandatory. if i select Phone then phone filed must become mandatory and Email field will be not mandatory. how to achieve this!!! :confused:
-
Validationsthanks for the reply :) but there is no IsRequired property.
-
Multilingual applicationcan u explain me lilbit detail!
-
Validationshi all, in my web page i have one dropdown list it contains Email and Phone values. and i hav email and phone textboxes. now the thing is if i select email from drop down list i want Email as mandatory, if i select phone from dropdown list i want Phone as mandatory! how to achieve this? i have written my code as follows! if (ddlCmethod.SelectedValue == "Telephone") { valmanEmail.IsValid = false; valmanPhone.IsValid = true; } else { valmanPhone.IsValid = false; valmanEmail.IsValid = true; }
-
Multilingual applicationHi all, i am developing one web site! in my web page i have one dropdown list for Select language. how can i change the language for whole content of the pages! can any body suggest me!
-
Adrotator [modified]can u explain me the procedure... wat r the steps i need to do!
-
Adrotator [modified]hi all, i have adrotator in my webpage, i want to update the images in regular intervels without using timer control. i want pictures to be changed in regular intervels without refreshing the page. how to access this? i dont want to use update panel and timer control too. is it possible to change the pictures in regular intervels without refreshing the page. plz guide me... -- modified at 6:38 Tuesday 9th October, 2007
-
DB errorHi all, i have developed my application using Asp.Net2.0 and Sql Server2005.. my application is running successfully in my local machine, but when i upload my application to the server i am getting the following error... Server Error in '/Modules' Application. -------------------------------------------------------------------------------- Invalid value for key 'attachdbfilename'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Invalid value for key 'attachdbfilename'. Source Error: The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL: 1. Add a "Debug=true" directive at the top of the file that generated the error. Example: <%@ Page Language="C#" Debug="true" %> or: 2) Add the following section to the configuration file of your application: Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode. Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. Stack Trace: [ArgumentException: Invalid value for key 'attachdbfilename'.] Login.imgbtnSubmit_Click(Object sender, ImageClickEventArgs e) +302 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +105 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
-
Server ErrorAfter Creating Virtual directory i am geeting the following error while running the application under Server Server Error in '/Modules' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The URL specified in the config file is invalid. Source Error: Line 63: Line 64: Line 65: Line 66: Line 67: Source File: D:\Domains\i-vertys.com\wwwroot\modules\web.config Line: 65 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832