vishul Posted March 22, 2012 Share Posted March 22, 2012 it is showing the error: Server Error in '/emailw3school' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CS0246: The type or namespace name 'Set' could not be found (are you missing a using directive or an assembly reference?)Source Error: Line 7: <title>Untitled Page</title>Line 8: <%Line 9: Set myMail=CreateObject("CDO.Message");Line 10: myMail.Subject="Sending email with CDO";Line 11: myMail.From="vishul.mittal@gmail.com"; & my code is: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title> <% Set myMail=CreateObject("CDO.Message");myMail.Subject="Sending email with CDO";myMail.From="vishul.mittal@gmail.com";myMail.To="vishul.m@ieguild.in";myMail.TextBody="Blah Blah Blah.....";myMail.Send;set myMail = nothing;%></head><body> <form id="form1" runat="server"> <div> </div> </form></body></html> Link to comment Share on other sites More sharing options...
justsomeguy Posted March 22, 2012 Share Posted March 22, 2012 Your page claims it is written using C# but the code is actually VBScript. Use one or the other. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.