dcsimg
Results 1 to 5 of 5

Thread: Run ASP file just by double-clicking on it? [Resolved]

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2004
    Posts
    60

    Resolved Run ASP file just by double-clicking on it? [Resolved]

    I have a ASP file named Sent.asp and it has CDONTS codes in it.
    When it is opened, it will autosend an email to the declared email address.

    U know when you double-click a html file (xx.html), it will open internet explorer with its contents listed. However, when I double-click on the ASP file (Sent.asp), it will open dreamweaver and even though I change the open-with to internet explorer, it still won't open. I am doing this because I don't want to access it (Sent.asp) using localhost, I want it to auto-send the email when I just double-click on it (Sent.asp). Is it possible? Or must I always have to access it through the http://localhost/MySite/Sent.asp for it to run and send the mail successfully? Or can I add additional codes to the CDONTS and make it a html file so that I can just open it with a double-click?

    CDONTS codes:
    <%
    Set Mail=Server.CreateObject("CDONTS.NewMail")
    Mail.To="forride@hotmail.com"
    Mail.From="esplan@hotmail.com"
    Mail.Subject="I am going abroad"
    Mail.Body="I am going off again, please close the doors."
    Mail.Send
    Set Mail=nothing
    response.Redirect "SentSuccessful.asp"
    %>
    Last edited by iori85z; Oct 11th, 2004 at 09:19 PM.

  2. #2
    ASP.NET Moderator mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,174

    Re: Run ASP file just by double-clicking on it?

    Originally posted by iori85z
    Or must I always have to access it through the http://localhost/MySite/Sent.asp for it to run and send the mail successfully?
    Yes. Always.

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2004
    Posts
    60
    So there are no more other ways to do it? I wan to just double-click on the file and the email will be send automatically w/o putting it in the INetpub/... folder) and I do not want to use 3rd party component/software to do it. What can I do? Change the code or change the extension? (e.g. .jsp, .php, ...)

  4. #4
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    Someplace 'ore the rainbow
    Posts
    392
    .js might do, but I forget the limitations that imposes.

    cjqp
    When your answer is the Arc Sin of 1.015, you should check your Pythagorean triple.

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2004
    Posts
    60
    Oh ok, guess I just have to leave it the way it is then, thanks.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width