Welcome to Dream.In.Code
Become an Expert!

Join 150,102 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,846 people online right now. Registration is fast and FREE... Join Now!




Need help with contact page, been teasing me for hours.

 
Reply to this topicStart new topic

Need help with contact page, been teasing me for hours.

pedersen1975
21 Jun, 2008 - 12:44 PM
Post #1

New D.I.C Head
*

Joined: 21 Jun, 2008
Posts: 5


My Contributions
I have been following a tutorial, and have made a contact page. But when I try to debug I get the following 3 error messages. Does anybody know what the errors mean?



1 ASP.contact_aspx.GetTypeHashCode()': no suitable method found to override
c:\Users\RenePedersen\AppData\Local\Temp\Temporary ASP.NETFiles\renedesign\cfc73a41412f916b
File: \App_Web_epukpzey.4.cs
Line: 1734

2 ASP.contact_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to override
c:\Users\Rene Pedersen\AppData\Local\Temp\Temporary ASP.NETFiles\renedesign\cfc73a41
\412f916b
File: \App_Web_epukpzey.4.cs
Line: 1739

3 ASP.contact_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable'
c:\Users\Rene Pedersen\AppData\Local\Temp\Temporary ASP.NET Files\renedesign\cfc73a41
\412f916b
File: \App_Web_epukpzey.4.cs
Line: 225

Here are the lines of code that the errors refer to:

CODE
    [System.Diagnostics.DebuggerNonUserCodeAttribute()]
       public override int GetTypeHashCode() {
              return -1526348532;
              }
        
              [System.Diagnostics.DebuggerNonUserCodeAttribute()]
      public override void ProcessRequest(System.Web.HttpContext context) {
              base.ProcessRequest(context);
              }    

              [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
         public class contact_aspx : global::Contact, System.Web.IHttpHandler {
        
              private static bool @__initialized;
        
              private static object @__fileDependencies;    
                                            }

User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Need Help With Contact Page, Been Teasing Me For Hours.
21 Jun, 2008 - 03:30 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
We need to see your code smile.gif You cant just post an error message and expect us to know what you're doing or what's causing the error. Remember, when posting your code please put it inside code blocks, like code.gif

smile.gif
User is offlineProfile CardPM
+Quote Post

pedersen1975
RE: Need Help With Contact Page, Been Teasing Me For Hours.
22 Jun, 2008 - 08:26 AM
Post #3

New D.I.C Head
*

Joined: 21 Jun, 2008
Posts: 5


My Contributions
Here is the code from contact.aspx


CODE
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Contact.aspx.cs" Inherits="Contact" Title="Kontakt" %>
<%@ Import NameSpace="System.Net.Mail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 98px;
        }
        .style3
        {
            width: 262px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="1" BackColor="Black"
        BorderColor="#CCCCCC" BorderWidth="2px" CancelButtonText="Fortryd"
        CancelDestinationPageUrl="~/Contact.aspx" CellPadding="10"
        DisplayCancelButton="True" FinishCompleteButtonText="Færdig"
        FinishPreviousButtonText="Tilbage" Font-Names="Tahoma" Font-Size="Medium"
        Height="306px" onfinishbuttonclick="Wizard1_FinishButtonClick"
        StartNextButtonText="Næste" StepNextButtonText="Næste"
        StepPreviousButtonText="Tilbage" style="margin-top: 24px" Width="592px">
        <StepStyle Font-Names="Tahoma" Font-Size="Medium" ForeColor="#333333"
            VerticalAlign="Top" />
        <StartNextButtonStyle CssClass="Button" />
        <StepNextButtonStyle CssClass="Button" />
        <WizardSteps>
            <asp:WizardStep runat="server" Title="Kontakt Info">
                <table cellpadding="10" class="style1">
                    <tr>
                        <td>
                            <asp:Label ID="Label1" runat="server" Font-Names="Tahoma" Font-Size="Medium"
                                ForeColor="White" Text="Navn:"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TxtNavn" runat="server" BackColor="White" BorderColor="Black"
                                BorderStyle="Ridge" BorderWidth="1px" Font-Names="Tahoma" Font-Size="Medium"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                ControlToValidate="TxtNavn" ErrorMessage="Udfyld venligst navn."
                                ForeColor="Silver">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label2" runat="server" Font-Names="Tahoma" Font-Size="Medium"
                                ForeColor="White" Text="Email:"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="TxtEmail" runat="server" BackColor="White" BorderColor="Black"
                                BorderStyle="Ridge" BorderWidth="1px" Font-Names="Tahoma" Font-Size="Medium"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                ControlToValidate="TxtEmail" ErrorMessage="Ikke en gyldig Email."
                                ForeColor="Silver"
                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                ControlToValidate="TxtEmail" ErrorMessage="Udfyld venligst Email."
                                ForeColor="Silver">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1" colspan="3">
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server"
                                ForeColor="Silver" ShowMessageBox="True" ShowSummary="False" />
                        </td>
                    </tr>
                </table>
            </asp:WizardStep>
            <asp:WizardStep runat="server" Title="Meddelelse" StepType="Finish">
                <table cellpadding="10" class="style1">
                    <tr>
                        <td class="style2">
                            <asp:Label ID="Label3" runat="server" Font-Names="Tahoma" Font-Size="Medium"
                                ForeColor="White" Text="Meddelelse"></asp:Label>
                        </td>
                        <td class="style3">
                            <asp:TextBox ID="TxtComment" runat="server" BackColor="White"
                                Font-Names="Tahoma" Font-Size="Medium" Height="173px" TextMode="MultiLine"
                                Width="250px"></asp:TextBox>
                        </td>
                        <td>
                            <asp:CustomValidator ID="CustomValidator1" runat="server"
                                ErrorMessage="Minimum 10 ord." ControlToValidate="TxtComment"
                                ForeColor="Silver" OnServerValidate="CustomValidator1_ServerValidate">*</asp:CustomValidator>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <asp:ValidationSummary ID="ValidationSummary2" runat="server"
                                ShowMessageBox="True" Visible="False" ForeColor="Silver" />
                        </td>
                    </tr>
                </table>
            </asp:WizardStep>
            <asp:WizardStep runat="server" StepType="Complete" Title="Færdig">
            </asp:WizardStep>
        </WizardSteps>
        <SideBarButtonStyle BackColor="Black" Font-Names="Verdana" ForeColor="White" />
        <NavigationButtonStyle BackColor="Black" BorderStyle="None" CssClass="Button"
            Font-Names="Tahoma" Font-Size="Medium" ForeColor="White" />
        <SideBarStyle BackColor="Black" Font-Names="Tahoma" Font-Size="Medium"
            VerticalAlign="Middle" Width="150px" />
        <HeaderStyle BackColor="#284E98" BorderColor="#EFF3FB" BorderStyle="Solid"
            BorderWidth="2px" Font-Bold="True" Font-Size="0.9em" ForeColor="White"
            HorizontalAlign="Center" />
        <CancelButtonStyle BackColor="Black" BorderColor="Black" BorderStyle="None"
            Font-Names="Tahoma" Font-Size="Medium" ForeColor="White" />
    </asp:Wizard>
</asp:Content>

User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Need Help With Contact Page, Been Teasing Me For Hours.
22 Jun, 2008 - 09:09 AM
Post #4

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
I was referring to the actual code, not the markup of the page, sorry for the confusion smile.gif
User is offlineProfile CardPM
+Quote Post

pedersen1975
RE: Need Help With Contact Page, Been Teasing Me For Hours.
22 Jun, 2008 - 09:12 AM
Post #5

New D.I.C Head
*

Joined: 21 Jun, 2008
Posts: 5


My Contributions
Do you mean the contact.aspx.cs? I'm quite new, so not sure what you mean.
User is offlineProfile CardPM
+Quote Post

Jayman
RE: Need Help With Contact Page, Been Teasing Me For Hours.
22 Jun, 2008 - 10:28 AM
Post #6

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,319



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Yes, that is the code that you need to post for this particular problem.
User is offlineProfile CardPM
+Quote Post

pedersen1975
RE: Need Help With Contact Page, Been Teasing Me For Hours.
22 Jun, 2008 - 10:34 AM
Post #7

New D.I.C Head
*

Joined: 21 Jun, 2008
Posts: 5


My Contributions
CODE
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;

public partial class _Default : System.Web.UI.Page
{
    protected void CustomValidator1_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args)
    {
        if ((txtComment.Text.Length < 25))
        {
            args.IsValid = false;
        }
        else
        {
            args.IsValid = true;
        }
    }
    protected void Wizard1_FinishButtonClick(object sender, System.Web.UI.WebControls.WizardNavigationEventArgs e)
    {
        SendMail(txtEmail.Text, txtComment.Text);
    }
    private void SendMail(string from, string body)
    {
        string mailServerName = "mail.renedesign.dk";
        MailMessage message = new MailMessage(from, "admin@renedesign.dk", body);
        SmtpClient mailClient = new SmtpClient();
        mailClient.Host = mailServerName;
        mailClient.Send(message);
        message.Dispose();
    }
}

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 12:43AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month