Divyakedia
03-23-2006, 07:40 AM
Hi,
this is the formpage.asp that i am running on my PC.(IIS is working fine,all .htm and .asp pages that i have made work!). this is the code of formpage.asp :
<form name="YourFormName" method="Post" action="confirmation.asp">
<table>
<tr><td>Email: </td>
<td><input type="text" name="Email" size="50"></td></tr>
<tr><td>First Name: </td>
<td><input type="text" name="FirstName" size="50"></td></tr>
<tr><td>Last Name: </td>
<td><input type="text" name="LastName" size="50"></td></tr>
<tr><td>Subject: </td>
<td><input type="text" name="Subject" size="50"></td></tr>
<tr><td>Comments: </td>
<td><textarea name="Comments"></textarea></td>
</table>
<input type="submit" name="Submit" value="Submit Form">
</form>
this is confirmation.asp code:
<%
DIM strEmail, strName, strComments, mail, reply, objMail
strEmail = request.form("Email")
strName = request.form("Name")
strComments = request.form("Comments")
mail = "dkedia@gmail.com"
reply = request.form("Email")
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = reply
objMail.Subject = "YOUR SUBJECT MESSAGE HERE"
objMail.To = mail
objMail.Body = "Email: " & strEmail & vbCrLf & _
"Name: " & strName & vbCrLf & _
"Comments: " & vbCrLf & strComments
objMail.Send
Set objMail = nothing
%>
<P><%
strName = request.form("Name")
Response.Write strName
%>,</P>
<P>Thank you for emailing me.</P>
when i hit the submit button on the formpage IE and mozilla show error messages:
IE--
The page cannot be displayed...
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
--------------------------------------------------------------------------------
Technical Information (for support personnel)
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/iisTutorial/confirmation.asp, line 9
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Page:
POST 81 bytes to /iisTutorial/confirmation.asp
POST Data:
Email=dk@gmail.com&FirstName=d&LastName=k&Subject=c&Comments=s&Submit=Submit+Form
Time:
Thursday, March 23, 2006, 5:45:07 PM
More information:
Microsoft Support
Pls. help me out as always. And also i would like to know why 'Just popping in' comes under my name. Can i change it?!
Also, just now I read this on a site:
"CDONTS is most commonly used with ASP. Be sure to check and see what is installed on your particular server."
How do I check this? I am doing all this on my local computer, and when I hit the submit button Internet is on so that the mail can reach its destination.(that was my 1st mistake!)
this is the formpage.asp that i am running on my PC.(IIS is working fine,all .htm and .asp pages that i have made work!). this is the code of formpage.asp :
<form name="YourFormName" method="Post" action="confirmation.asp">
<table>
<tr><td>Email: </td>
<td><input type="text" name="Email" size="50"></td></tr>
<tr><td>First Name: </td>
<td><input type="text" name="FirstName" size="50"></td></tr>
<tr><td>Last Name: </td>
<td><input type="text" name="LastName" size="50"></td></tr>
<tr><td>Subject: </td>
<td><input type="text" name="Subject" size="50"></td></tr>
<tr><td>Comments: </td>
<td><textarea name="Comments"></textarea></td>
</table>
<input type="submit" name="Submit" value="Submit Form">
</form>
this is confirmation.asp code:
<%
DIM strEmail, strName, strComments, mail, reply, objMail
strEmail = request.form("Email")
strName = request.form("Name")
strComments = request.form("Comments")
mail = "dkedia@gmail.com"
reply = request.form("Email")
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = reply
objMail.Subject = "YOUR SUBJECT MESSAGE HERE"
objMail.To = mail
objMail.Body = "Email: " & strEmail & vbCrLf & _
"Name: " & strName & vbCrLf & _
"Comments: " & vbCrLf & strComments
objMail.Send
Set objMail = nothing
%>
<P><%
strName = request.form("Name")
Response.Write strName
%>,</P>
<P>Thank you for emailing me.</P>
when i hit the submit button on the formpage IE and mozilla show error messages:
IE--
The page cannot be displayed...
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
--------------------------------------------------------------------------------
Technical Information (for support personnel)
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/iisTutorial/confirmation.asp, line 9
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Page:
POST 81 bytes to /iisTutorial/confirmation.asp
POST Data:
Email=dk@gmail.com&FirstName=d&LastName=k&Subject=c&Comments=s&Submit=Submit+Form
Time:
Thursday, March 23, 2006, 5:45:07 PM
More information:
Microsoft Support
Pls. help me out as always. And also i would like to know why 'Just popping in' comes under my name. Can i change it?!
Also, just now I read this on a site:
"CDONTS is most commonly used with ASP. Be sure to check and see what is installed on your particular server."
How do I check this? I am doing all this on my local computer, and when I hit the submit button Internet is on so that the mail can reach its destination.(that was my 1st mistake!)