Cannot Use CDONTS function on asp page hosted by A

Results 1 to 2 of 2

Thread: Cannot Use CDONTS function on asp page hosted by A

  1. #1
    Join Date
    Dec 1969

    Default Cannot Use CDONTS function on asp page hosted by A

    I have previously had an ASP page (transactconfirm.asp) that wrote values to a database (using DRW) that was hosted by some domain host. I moved my domain to a new host that supported ASP.NET.<BR>Now, my database results are still writing to the database, but my CDONTS function doesn&#039;t work. The asp page doesn&#039;t error out, it displays the databases results written, but the cdonts function just simply doesn&#039;t work. So, I asked my host provider, and they noted since they moved to the .NET frame work this function would not work.<BR>So, ok..I decided to go with the flow..which means I needed to create some sort of equivalent of the CDONTS function which would function on the asp page but use the technology.<BR>So...this brought me to the infamous smtp strategy that it to be used.<BR>The code looks like this (which by the way has to be on an aspx page to work right)<BR><BR>&#060;%@ Import Namespace="System.Web.Mail"%&#062;<BR>&#060;%Enabl eViewStateMac="false"%&#062; <BR>&#060;%<BR> Dim objMail As New System.Web.Mail.MailMessage()<BR> <BR> objMail.From = ""<BR> objMail.To = Request.Form("Email")<BR> objMail.Subject = "Your Purchase"<BR> objMail.BodyFormat = MailFormat.Html<BR> objMail.Priority = MailPriority.High<BR> objMail.Body = " This is a test <BR>"& _<BR>"********************<BR>" <BR> <BR> System.Web.Mail.SmtpMail.SmtpServer = ""<BR> System.Web.Mail.SmtpMail.Send(objMail)<BR> objMail = Nothing<BR><BR>%&#062;<BR><BR>My first issue, was that I couldn&#039;t put this code on my confirm.asp page, because it was purely code for<BR>So I decided to put it on another seperate aspx page. (autoemail.aspx)<BR>I thought I would firstly submit to this page, and then redirect to the transactconfirm.asp. By the way, my original form that submitted information was called purchaseticket.htm<BR>So my thought something like this:<BR>1. Fill out form on purchaseticket.htm<BR>2. Submit form to autoemail.aspx (in directly submits email)<BR>3. autoemail.aspx redirects to transactconfirm.asp<BR><BR>Unfortunately, for me the redirect ends up loosing all the values first entered.<BR>So I moved toward:<BR>1. Fill out form on purchaseticket.htm<BR>2. Submit values straight to transactconfirm.asp<BR>3. Use Server.Execute("autoemail.aspx") on the transactconfirm.asp<BR><BR>This also errored out, with the generic aspx command line invalid.<BR>So I&#039;m not liking the asp/aspx merge try out...but wondered if anyone had any suggestions, to get my email to submit on my transactconfirm.asp page without altering or completely redoing all pages to aspx.<BR><BR>Any ideas, suggestions greatly appreciated.<BR>Thank you.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Yep...need to use CDOSYS...

    ...or convince that host to install CDONTS, also. But CDOSYS is what comes by default now. CDONTS is considered obsolete.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts