|
Well, if you are unhappy with DiscountASP then I think you are in for a tough time. I have been with them for over 5 years and their servers have a very high availability. http://www.youralarm.com - written in ASP.net & SQL Server
|
|
|
|
|
|
If you understood what a master was and did this would be easily answered. Hint: the master page and content page are consolidated when rendered. I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi guys
i am developing a website in ASP.NET using vb.net in the visual studios 2008 IDE. I am attempting to send an email from my website. i keep getting a "sending message failure" on my site. here is my code. hopefully somebody can be of assistance. much help appreciated.
ContactUs.aspx.vb:
Partial Class Default2
Inherits System.Web.UI.Page
Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
Dim mailMessage As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
mailMessage.From = New System.Net.Mail.MailAddress(txtFromAddress.Text.Trim())
mailMessage.To.Add(New System.Net.Mail.MailAddress(txtToAddress.Text.Trim()))
mailMessage.Subject = txtSubject.Text.Trim()
mailMessage.Body = txtBody.Text.Trim()
Dim smtpClient As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient()
smtpClient.Send(mailMessage) *THIS IS WHERE THE ERROR SHOWS UP WHEN I CLICK SEND*
End Sub
Here is my web.config file code:
<system.net>
<mailSettings>
<smtp>
<network host="localhost"/>
</smtp>
</mailSettings>
</system.net>
End Class
thanks in advance!!
Daithi
|
|
|
|
|
Format the code you have posted according to the guidelines. I will only answer questions that have been properly formatted I know the language. I've read a book. - _Madmatt
|
|
|
|
|
There is nothing wrong with the code, but you havent setup your smtp server. you are using <network host="localhost"/> where smtp is not setup. so either use your company email server i.e. mail.yourcompanydomain.com
if you dont have smtp server setup at your company, then you can use Gmail, just create an account on gmail and you can use smtp.gmail.com as your stmp server with the user name and password that you have created.
use the following example...
public static void CreateTestMessage1(string server, int port)
{
string to = "someone@somewhere.com";
string from = "me@somewhere.com";
string subject = "Using the new SMTP client.";
string body = @"Using this new feature, you can send an e-mail message from an application very easily.";
MailMessage message = new MailMessage(from, to, subject, body);
SmtpClient client = new SmtpClient("smtp server name");
client.Credentials = new System.Net.NetworkCredential("username", "password");
try {
client.Send(message);
}
catch (Exception ex) {
Console.WriteLine("Exception caught in CreateTestMessage1(): {0}",
ex.ToString() );
}
}
also as Mark said, please use the code block feature when you post a code in your question.
|
|
|
|
|
Hello,
I have to convert an .aspx page to PDF. I tried to use the AbcPDF.net 7.1 but its dll were failed to be referenced in a Visual studio 2003 with .Net1.1, project. May be because it does not support dotnet1.1. Can anybody tell me which version is compatible with ASP.Net 1.1. Or there any other alternate 3rd party to convert an asp.net 1.1 page to PDF. Will be very thankful for a propmt reply.
Thanks,
Safvi
|
|
|
|
|
Have you tried asking ABCPDF??? Try iTextSharp.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
I have used the free version of DynamicPDF from ceTe Software for many years without any problems http://www.youralarm.com - written in ASP.net & SQL Server
|
|
|
|
|
hello,
On page load event i am generating a report in an aspx file and then
capturing the html and saving it as html file to be sent as emil attachemt. This has to be done multiple times for different users.
I am overriding the render method of the page to get the html. It works okay for the first time but i need to create the report multiple time. When the below code is called for second time on page load event to capture the newly created report, it gives the error '"A page can have only one server-side Form tag"'. Following the code.
Dim sb As New System.Text.StringBuilder
Dim sw As New System.IO.StringWriter(sb)
Dim hWriter As New HtmlTextWriter(sw)
MyBase.Render(hWriter)
' *** store to a string
Dim PageResult As String = sb.ToString()
' *** Write it back to the server
writer.Write(PageResult)
str = PageResult
i get error on MyBase.Render(hWriter). Remember its working okay for the first. So how can i get the html of the page multiple times????
Thanks,
Safvi
|
|
|
|
|
Don't post the same question (even if you change a few words) more than once.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
Hello Experts,
I have a lot of questions in my mind. So i want to share with you.
1. Actually i want to know that how the Search Engine Works.How can he knows about sites.and Where is the total information of Sites.
2. What is the process of HOSTING in Programmigly.
Your suggession and help is required.
ThanksIf you can think then I Can.
|
|
|
|
|
|
I know that but i have not found a suitable link according to my requirement. If you can think then I Can.
|
|
|
|
|
Hi All,
when i debug my web application
on my machine , the culture is el-GR.
When i upload the aspx files on a server located in US
the culture changes to En-US and i have
problems with Datetimes..
Any help would be appreciated..
Nick Maltis
|
|
|
|
|
This[^] would be a good read for this problem.
|
|
|
|
|
hello,
I am overriding the render method of the page to get the html of a page this is infact a report. It works okay for the first time but i need to create the report multiple time. When the below code is called for second time to capture the newly created report, it gives the error '"A page can have only one server-side Form tag"'. Following the code.
Dim sb As New System.Text.StringBuilder
Dim sw As New System.IO.StringWriter(sb)
Dim hWriter As New HtmlTextWriter(sw)
MyBase.Render(hWriter)
' *** store to a string
Dim PageResult As String = sb.ToString()
' *** Write it back to the server
writer.Write(PageResult)
str = PageResult
Thanks,
Safvi
|
|
|
|
|
I have a page which contains ASP.NET AJAX toolkit (Accordion). I have around 22 AccordionPanel. All the controls in my page is within UpdatePanel control. When i ecute the project and when the Accordion is visible on screen, i go to check its HTML view source but it does not display anything that is within UpdatePanel in HTML. In Accordion I have few more ASP.NEt controls like textboxes, RadioButton and lot more.
Anyone can help how i will get the HTML of the controls.
Thanks in advance
|
|
|
|
|
It depends on what browser you are using. If its IE8 hit F12. For earlier IE versions get the developer toolbar.
|
|
|
|
|
|
Hi there
I am making a website in ASP.NET using vb.net in the Visual Studios 2008 IDE. I am just wondering is it difficult to embed a PDF file in a content page???
Any help appreciated..
cheers
Daithi
|
|
|
|
|
What do u mean by embedding? Do u mean creating a PDF file on any user control event. Like Print button, when hit should create a PDF control.
Let me know if i understand you correctly
|
|
|
|
|
Just use <iframe src="yourPDFfilenamewithPath.pdf" width="500" height="500" /> and the web browser will automatically load the pdf in the iframe.
or you can create a user control[^]
|
|
|
|
|
ya that did the trick!! thanks so much for the help!!
|
|
|
|
|
How do u send attachments by mail in VB.NET.
Do we need to save them temporarily and then delete afterwards?
|
|
|
|