Avatar billede Blackface Nybegynder
19. april 2012 - 13:27 Der er 3 kommentarer

Asp.Net c#- Kontaktformular Fejl.

Hej min Kontaktformular virker ikke , og jeg har også sendt fejlen som jeg får længere nede.. Kan nogen se hvad det er jeg gør der er galt.?





HTML KODEN:

<%

@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="contact.aspx.cs" Inherits="contact"

%>


<


asp:Content ID="Content1" ContentPlaceHolderID="head" Runat


="Server">



</


asp:Content


>



<


asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat


="Server">




<div id


="contact">

<





h2>Contact Us</h2><br /><table> <!-- Name --> <tr> <td align="center"> Name:</td> <td> <asp:TextBox ID="txtName" runat="server" Columns="50"></asp:TextBox> </td> </tr> <!-- Subject --> <tr> <td align="center"> Subject: </td> <td> <asp:DropDownList ID="ddlSubject" runat="server"> <asp:ListItem>Ask a question</asp:ListItem> <asp:ListItem>Report a bug</asp:ListItem> <asp:ListItem>Customer support ticket</asp:ListItem> <asp:ListItem>Other</asp:ListItem> </asp:DropDownList> </td> </tr> <!-- Message --> <tr> <td align="center"> Message: </td> <td> <asp:TextBox ID="txtMessage" runat="server" Columns="40" Rows="6" TextMode="MultiLine"></asp:TextBox> </td> </tr> <!-- Submit --> <tr align="center"> <td colspan="2"> <asp:Button ID="btnSubmit" runat="server" Text="Submit" onclick="btnSubmit_Click" /> </td> </tr> <!-- Results --> <tr align="center"> <td colspan="2"> <asp:Label ID="lblResult" runat="server"></asp:Label> </td> </tr></table


>





</div


>




</


asp:Content


>










C# Koden:



using System;

using



System.Collections;


using



System.Configuration;


using



System.Data;


using



System.Linq;


using



System.Web;


using



System.Web.Security;


using



System.Web.UI;


using



System.Web.UI.HtmlControls;


using



System.Web.UI.WebControls;


using



System.Web.UI.WebControls.WebParts;


using



System.Xml.Linq;


using



System.Net.Mail;


using



System.Net;


using



System.Web.Configuration;


public


partial class contact : System.Web.UI.


UserControl



{


protected void Page_Load(object sender, EventArgs

e)

{


}


&#12288;





protected void btnSubmit_Click(object sender, EventArgs

e)

{







try



{


MailMessage msg = new MailMessage

();

msg.To.Add("email");




MailAddress address = new MailAddress("email");

msg.From = address;


msg.Subject = txtName.Text +



" : "

+ ddlSubject.Text; msg.Body = txtMessage.Text;




SmtpClient client = new SmtpClient("asmtp.unoeuro.com", 25); client.EnableSsl = true

;




NetworkCredential credentials = new NetworkCredential("Email", "kode"); client.Credentials = credentials;

client.Send(msg);


lblResult.Text =



"Your message was sent!"

;

txtName.Text =



""

;

txtMessage.Text =



""

;

}







catch



{

&#12288;

lblResult.Text =

"Your message failed to send, please try again."

;

}


}


}







FEJLEN:





Server Error in '/' 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: CS0115: 'ASP.contact_aspx.GetTypeHashCode()': der blev ikke fundet nogen metode, der kan tilsidesættes

Source Error:








Line 682: Line 683: [System.Diagnostics.DebuggerNonUserCodeAttribute()] Line 684: public override int GetTypeHashCode() { Line 685: return -1664664340; Line 686: }



Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\df2f290d\74248321\App_Web_contact.aspx.cdcab7d2.bcpqjj3x.0.cs Line: 684




Show Detailed Compiler Output:











Show Complete Compilation Source:












--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Avatar billede Blackface Nybegynder
19. april 2012 - 13:30 #1
Error    1    'ASP.contact_aspx.GetTypeHashCode()': der blev ikke fundet nogen metode, der kan tilsidesættes    c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\en\7b38d874\5f467d81\App_Web_y5qlespo.2.cs    684   
Error    2    'ASP.contact_aspx.ProcessRequest(System.Web.HttpContext)': der blev ikke fundet nogen metode, der kan tilsidesættes    c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\en\7b38d874\5f467d81\App_Web_y5qlespo.2.cs    689   
Error    3    'ASP.contact_aspx' implementerer ikke grænseflademedlemmet 'System.Web.IHttpHandler.IsReusable'    c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\en\7b38d874\5f467d81\App_Web_y5qlespo.2.cs    199
Avatar billede Blackface Nybegynder
19. april 2012 - 13:34 #2
#pragma checksum "C:\inetpub\wwwroot\ensarsoft\contact.aspx" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "E6242EFDDC07947EB498B344B1611233"
//------------------------------------------------------------------------------
// <auto-generated>
//    Denne kode blev oprettet ved hjælp af et værktøj.
//    Runtime-version:4.0.30319.261
//
//    Ændringer af denne fil kan resultere i ukorrekt funktion, og ændringerne mistes, hvis
//    koden oprettes igen.
// </auto-generated>
//------------------------------------------------------------------------------



public partial class contact : System.Web.SessionState.IRequiresSessionState {
   
   
    #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    protected global::System.Web.UI.WebControls.TextBox txtName;
   
    #line default
    #line hidden
   
   
    #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    protected global::System.Web.UI.WebControls.DropDownList ddlSubject;
   
    #line default
    #line hidden
   
   
    #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    protected global::System.Web.UI.WebControls.TextBox txtMessage;
   
    #line default
    #line hidden
   
   
    #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    protected global::System.Web.UI.WebControls.Button btnSubmit;
   
    #line default
    #line hidden
   
   
    #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    protected global::System.Web.UI.WebControls.Label lblResult;
   
    #line default
    #line hidden
   
    protected System.Web.Profile.DefaultProfile Profile {
        get {
            return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));
        }
    }
   
    protected System.Web.HttpApplication ApplicationInstance {
        get {
            return ((System.Web.HttpApplication)(this.Context.ApplicationInstance));
        }
    }
}
namespace ASP {
   
    #line 3 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    using System.Web.UI.WebControls.Expressions;
   
    #line default
    #line hidden
   
    #line 384 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Collections;
   
    #line default
    #line hidden
   
    #line 390 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Text;
   
    #line default
    #line hidden
   
    #line 3 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    using System.Web.UI;
   
    #line default
    #line hidden
   
    #line 385 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Collections.Generic;
   
    #line default
    #line hidden
   
    #line 389 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Linq;
   
    #line default
    #line hidden
   
    #line 402 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Xml.Linq;
   
    #line default
    #line hidden
   
    #line 3 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    using System.Web.UI.WebControls;
   
    #line default
    #line hidden
   
    #line 395 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Web.SessionState;
   
    #line default
    #line hidden
   
    #line 386 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Collections.Specialized;
   
    #line default
    #line hidden
   
    #line 391 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Text.RegularExpressions;
   
    #line default
    #line hidden
   
    #line 392 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Web;
   
    #line default
    #line hidden
   
    #line 3 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    using System.Web.DynamicData;
   
    #line default
    #line hidden
   
    #line 393 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Web.Caching;
   
    #line default
    #line hidden
   
    #line 397 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Web.Profile;
   
    #line default
    #line hidden
   
    #line 387 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.ComponentModel.DataAnnotations;
   
    #line default
    #line hidden
   
    #line 396 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Web.Security;
   
    #line default
    #line hidden
   
    #line 383 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System;
   
    #line default
    #line hidden
   
    #line 3 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    using System.Web.UI.WebControls.WebParts;
   
    #line default
    #line hidden
   
    #line 388 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Configuration;
   
    #line default
    #line hidden
   
    #line 1 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
    using ASP;
   
    #line default
    #line hidden
   
    #line 401 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config"
    using System.Web.UI.HtmlControls;
   
    #line default
    #line hidden
   
   
    [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
    public class contact_aspx : global::contact, System.Web.IHttpHandler {
       
        private static bool @__initialized;
       
        private static object @__fileDependencies;
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public contact_aspx() {
            string[] dependencies;
           
            #line 912304 "C:\inetpub\wwwroot\ensarsoft\contact.aspx.cs"
            ((global::System.Web.UI.Page)(this)).AppRelativeVirtualPath = "~/contact.aspx";
           
            #line default
            #line hidden
            if ((global::ASP.contact_aspx.@__initialized == false)) {
                dependencies = new string[4];
                dependencies[0] = "~/contact.aspx";
                dependencies[1] = "~/MasterPage.master";
                dependencies[2] = "~/MasterPage.master.cs";
                dependencies[3] = "~/contact.aspx.cs";
                global::ASP.contact_aspx.@__fileDependencies = this.GetWrappedFileDependencies(dependencies);
                global::ASP.contact_aspx.@__initialized = true;
            }
            this.Server.ScriptTimeout = 30000000;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void @__BuildControlContent1(System.Web.UI.Control @__ctrl) {
            System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
           
            #line 3 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n\r\n"));
           
            #line default
            #line hidden
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.TextBox @__BuildControltxtName() {
            global::System.Web.UI.WebControls.TextBox @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.TextBox();
           
            #line default
            #line hidden
            this.txtName = @__ctrl;
            @__ctrl.TemplateControl = this;
            @__ctrl.ApplyStyleSheetSkin(this);
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.ID = "txtName";
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Columns = 50;
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.ListItem @__BuildControl__control3() {
            global::System.Web.UI.WebControls.ListItem @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.ListItem();
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Text = "Ask a question";
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.ListItem @__BuildControl__control4() {
            global::System.Web.UI.WebControls.ListItem @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.ListItem();
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Text = "Report a bug";
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.ListItem @__BuildControl__control5() {
            global::System.Web.UI.WebControls.ListItem @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.ListItem();
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Text = "Customer support ticket";
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.ListItem @__BuildControl__control6() {
            global::System.Web.UI.WebControls.ListItem @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.ListItem();
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Text = "Other";
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void @__BuildControl__control2(System.Web.UI.WebControls.ListItemCollection @__ctrl) {
            global::System.Web.UI.WebControls.ListItem @__ctrl1;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl1 = this.@__BuildControl__control3();
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Add(@__ctrl1);
           
            #line default
            #line hidden
            global::System.Web.UI.WebControls.ListItem @__ctrl2;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl2 = this.@__BuildControl__control4();
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Add(@__ctrl2);
           
            #line default
            #line hidden
            global::System.Web.UI.WebControls.ListItem @__ctrl3;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl3 = this.@__BuildControl__control5();
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Add(@__ctrl3);
           
            #line default
            #line hidden
            global::System.Web.UI.WebControls.ListItem @__ctrl4;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl4 = this.@__BuildControl__control6();
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Add(@__ctrl4);
           
            #line default
            #line hidden
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.DropDownList @__BuildControlddlSubject() {
            global::System.Web.UI.WebControls.DropDownList @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.DropDownList();
           
            #line default
            #line hidden
            this.ddlSubject = @__ctrl;
            @__ctrl.TemplateControl = this;
            @__ctrl.ApplyStyleSheetSkin(this);
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.ID = "ddlSubject";
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            this.@__BuildControl__control2(@__ctrl.Items);
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.TextBox @__BuildControltxtMessage() {
            global::System.Web.UI.WebControls.TextBox @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.TextBox();
           
            #line default
            #line hidden
            this.txtMessage = @__ctrl;
            @__ctrl.TemplateControl = this;
            @__ctrl.ApplyStyleSheetSkin(this);
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.ID = "txtMessage";
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Columns = 40;
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Rows = 6;
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.TextMode = global::System.Web.UI.WebControls.TextBoxMode.MultiLine;
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.Button @__BuildControlbtnSubmit() {
            global::System.Web.UI.WebControls.Button @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.Button();
           
            #line default
            #line hidden
            this.btnSubmit = @__ctrl;
            @__ctrl.TemplateControl = this;
            @__ctrl.ApplyStyleSheetSkin(this);
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.ID = "btnSubmit";
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Text = "Submit";
           
            #line default
            #line hidden
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Click += new System.EventHandler(this.btnSubmit_Click);
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.Label @__BuildControllblResult() {
            global::System.Web.UI.WebControls.Label @__ctrl;
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.Label();
           
            #line default
            #line hidden
            this.lblResult = @__ctrl;
            @__ctrl.TemplateControl = this;
            @__ctrl.ApplyStyleSheetSkin(this);
           
            #line 10 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.ID = "lblResult";
           
            #line default
            #line hidden
            return @__ctrl;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void @__BuildControlContent3(System.Web.UI.Control @__ctrl) {
            System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n\r\n    <div id=\"contact\">\r\n<h2>Contact Us</h2><br /><table>    <!-- Name -->  " +
                        " <tr>        <td align=\"center\">            Name:</td>        <td>            "));
           
            #line default
            #line hidden
            global::System.Web.UI.WebControls.TextBox @__ctrl1;
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl1 = this.@__BuildControltxtName();
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(@__ctrl1);
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("        </td>    </tr>    <!-- Subject -->    <tr>        <td align=\"center\">  " +
                        "        Subject:        </td>        <td>            "));
           
            #line default
            #line hidden
            global::System.Web.UI.WebControls.DropDownList @__ctrl2;
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl2 = this.@__BuildControlddlSubject();
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(@__ctrl2);
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("        </td>    </tr>    <!-- Message -->    <tr>        <td align=\"center\">  " +
                        "        Message:        </td>        <td>            "));
           
            #line default
            #line hidden
            global::System.Web.UI.WebControls.TextBox @__ctrl3;
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl3 = this.@__BuildControltxtMessage();
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(@__ctrl3);
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("        </td>    </tr>    <!-- Submit -->    <tr align=\"center\">        <td cols" +
                        "pan=\"2\">            "));
           
            #line default
            #line hidden
            global::System.Web.UI.WebControls.Button @__ctrl4;
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl4 = this.@__BuildControlbtnSubmit();
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(@__ctrl4);
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("        </td>    </tr>                <!-- Results -->    <tr align=\"center\">    " +
                        "    <td colspan=\"2\">            "));
           
            #line default
            #line hidden
            global::System.Web.UI.WebControls.Label @__ctrl5;
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl5 = this.@__BuildControllblResult();
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(@__ctrl5);
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("        </td>    </tr></table>\r\n                            \r\n    </div>\r\n  \r\n"));
           
            #line default
            #line hidden
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void @__BuildControlTree(contact_aspx @__ctrl) {
           
            #line 1 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.Title = "";
           
            #line default
            #line hidden
           
            #line 1 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__ctrl.MasterPageFile = "~/MasterPage.master";
           
            #line default
            #line hidden
           
            #line 1 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            this.InitializeCulture();
           
            #line default
            #line hidden
           
            #line 3 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            this.AddContentTemplate("head", new System.Web.UI.CompiledTemplateBuilder(new System.Web.UI.BuildTemplateMethod(this.@__BuildControlContent1)));
           
            #line default
            #line hidden
           
            #line 7 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            this.AddContentTemplate("ContentPlaceHolder1", new System.Web.UI.CompiledTemplateBuilder(new System.Web.UI.BuildTemplateMethod(this.@__BuildControlContent3)));
           
            #line default
            #line hidden
            System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
           
            #line 1 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n\r\n"));
           
            #line default
            #line hidden
           
            #line 1 "C:\inetpub\wwwroot\ensarsoft\contact.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n"));
           
            #line default
            #line hidden
        }
       
       
        #line 912304 "C:\inetpub\wwwroot\ensarsoft\contact.aspx.cs"
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override void FrameworkInitialize() {
            base.FrameworkInitialize();
            this.@__BuildControlTree(this);
            this.AddWrappedFileDependencies(global::ASP.contact_aspx.@__fileDependencies);
            this.Request.ValidateInput();
        }
       
        #line default
        #line hidden
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public override int GetTypeHashCode() {
            return -1664664340;
        }
       
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public override void ProcessRequest(System.Web.HttpContext context) {
            base.ProcessRequest(context);
        }
    }
}
Avatar billede jokkejensen Novice
30. april 2012 - 13:37 #3
Med et @Page directive er det nok:

partial class contact : System.Web.UI.UserControl


Der skal ændres til :

partial class contact : System.Web.UI.Page


Lad være at installere Frameworket på dansk, de danske fejlmeddelelser er elendige..

/J
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester