Link to home
Start Free TrialLog in
Avatar of assaultkitty
assaultkitty

asked on

Airline10

Error      134      'System.Web.UI.WebControls.Wizard' does not contain a definition for 'ActiveStepType' and no extension method 'ActiveStepType' accepting a first argument of type 'System.Web.UI.WebControls.Wizard' could be found (are you missing a using directive or an assembly reference?)      C:\Course Technology\CIS Programming\ASP .NET Programming\Data Files\Chapter.09\Chapter\SkywardAviation\ContactInfo.aspx.cs      68      25      C:\...\SkywardAviation\

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["flyerID"] == null)
            Response.Redirect("Login.aspx");
        if (profileForm.ActiveStep.StepType
            == WizardStepType.Start)
            hiddenPassword.Value = password.Text;
        SqlConnection dbConnection = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDBFilename=C:\\Course Technology\\CIS Programming\\ASP .NET Programming\\Data Files\\Chapter.09\\Chapter\\SkywardAviation.mdf;Integrated Security-True; User Instance=True");
        dbConnection.Open();
        try
        {
            SqlCommand sqlCommand = new SqlCommand(
                "SELECT * FROM FrequentFlyers WHERE flyerID = "
                + Request.QueryString["flyerID"], dbConnection);
            SqlDataReader userInfo = sqlCommand.ExecuteReader();
            if (userInfo.Read())
            {
                firstName.Text = userInfo["first"].ToString();
                lastName.Text = userInfo["last"].ToString();
                telephone.Text = userInfo["phone"].ToString();
                email.Text = userInfo["email"].ToString();
                confirmEmail.Text = userInfo["email"].ToString();
                creditcard.Text = userInfo["cardType"].ToString();
                expireMonth.Text = userInfo["expireMonth"].ToString();
                expireYear.Text = userInfo["expireYear"].ToString();
                cardnumber.Text = userInfo["cardnumber"].ToString();
                cardholder.Text = userInfo["cardholder"].ToString();
                address.Text = userInfo["address"].ToString();
                city.Text = userInfo["city"].ToString();
                state.Text = userInfo["state"].ToString();
                zip.Text = userInfo["zip"].ToString();
                travelerType.Text = userInfo["travelerType"].ToString();
                homeAirport.Text = userInfo["homeAirport"].ToString();
                serviceClass.Text = userInfo["class"].ToString();
                seatPreference.Text = userInfo["seat"].ToString();
                mealRequest.Text = userInfo["meal"].ToString();
                updateOK.Text = "<p>Account successfully updated.</p><p><href='ffClubPage.aspx?flyerID=" + Request.QueryString["flyerID"]
                        + "'>Account Profile page</a></p>";
                }
            else
            {
                profileForm.Visible =false;
                updateErrors.Text = "<p>Invalid frequent flyer number!</p>";
            }
            userInfo.Close();
        }
        catch (SqlException exception)
        {
            Response.Write("<p>Error code "
                + exception.Number
                + "; " + exception.Message + "</p>");
        }
        dbConnection.Close();
    }
    protected void Page_LoadComplete(
        object sender, EventArgs e)
    {
        if (profileForm.ActiveStepType
            == WizardStepType.Complete)
        {
            SqlConnection dbConnection = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDBFilename=C:\\Course Technology\\CIS Programming\\ASP .NET Programming\\Data Files\\Chapter.09\\Chapter\\SkywardAviation.mdf;Integrated Security-True; User Instance=True");
        try
        {
            dbConnection.Open();
            SqlCommand sqlCommand = new SqlCommand(
                "UPDATE FrequentFlyers SET " 
                + "last= '" + lastName.Text + "',"
                + "first = '" + firstName.Text + "',"
                + "phone = '" + telephone.Text + "',"
                + "email = '" + email.Text + "',"
                + "password = '" + hiddenPassword.Value + "',"
                + "cardType = '" + creditcard.Text + "',"
                + "expireMonth = '" + expireMonth.Text + "',"
                + "expireYear = '" + expireYear.Text + "',"
                + "cardnumber = '" + cardnumber.Text + "',"
                + "address = '" + address.Text + "',"
                + "city = '" + city.Text + "',"
                + "state = '" + state.Text + "',"
                + "zip = '" + zip.Text + "',"
                + "travelerType = '" + travelerType.Text + "',"
                + "homeAirport = '" + homeAirport.Text + "',"
                + "class = '" + serviceClass.Text + "',"
                + "seat = '" + seatPreference.Text + "',"
                + "meal = '" + mealRequest.Text + "',"
                + "' WHERE flyerID = "
                + Request.QueryString["flyerID"], dbConnection);
            sqlCommand.ExecuteNonQuery();
        }    
        catch (SqlException exception)
        {
            updateOK.Text = "<p>Error code " + exception.Number
                + ": " + exception.Message + "</p>";
        }
        dbConnection.Close();
        }
       
    }


}


<%@ Page Language="C#" Debug="true" AutoEventWireup="true" CodeFile="Login.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>
    <title>Skyward Airlines</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="callback_navtop">
        <tr>
            <td width="56%" height="60" class="logoname">
                &nbsp; &nbsp; &nbsp; Skyward Airlines
            </td>
            <td width="44%">
                &nbsp;
            </td>
        </tr>
    </table>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="menu">
        <tr>
            <td class="cellbackmenuunder">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="txtmenu">
                            <img src="images/spacer.gif" width="95" height="1" alt="Formatting image" />
                        </td>
                    </tr>
                    <tr>
                        <td class="txtmenu">
                            <div align="center">
                                <a href="index.htm">Home</a></div>
                        </td>
                    </tr>
                </table>
            </td>
            <td class="cellbackmenuover">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="txtmenu">
                            <img src="images/spacer.gif" width="95" height="1" alt="Formatting image" />
                        </td>
                    </tr>
                    <tr>
                        <td class="txtmenu">
                            <div align="center">
                                <a href="ffClubPage.aspx"><font color="#20809F">Frequent Flyers</font></a></div>
                        </td>
                    </tr>
                </table>
            </td>
            <td class="cellbackmenuunder">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="txtmenu">
                            <img src="images/spacer.gif" width="95" height="1" alt="Formatting image" />
                        </td>
                    </tr>
                    <tr>
                        <td class="txtmenu">
                        </td>
                    </tr>
                </table>
            </td>
            <td class="cellbackmenuunder">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="txtmenu">
                            <img src="images/spacer.gif" width="95" height="1" alt="Formatting image" />
                        </td>
                    </tr>
                    <tr>
                        <td class="txtmenu">
                        </td>
                    </tr>
                </table>
            </td>
            <td class="cellbackmenuunder">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="txtmenu">
                            <img src="images/spacer.gif" width="95" height="1" alt="Formatting image" />
                        </td>
                    </tr>
                    <tr>
                        <td class="txtmenu">
                        </td>
                    </tr>
                </table>
            </td>
            <td class="cellbackmenuunder">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="txtmenu">
                            <img src="images/spacer.gif" width="95" height="1" alt="Formatting image" />
                        </td>
                    </tr>
                    <tr>
                        <td class="txtmenu">
                        </td>
                    </tr>
                </table>
            </td>
            <td class="cellbackmenuunder">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="txtmenu">
                            <img src="images/spacer.gif" width="95" height="1" alt="Formatting image" />
                        </td>
                    </tr>
                    <tr>
                        <td class="txtmenu">
                        </td>
                    </tr>
                </table>
            </td>
            <td class="cellbackmenuunder">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="txtmenu">
                            <img src="images/spacer.gif" width="95" height="1" alt="Formatting image" />
                        </td>
                    </tr>
                    <tr>
                        <td class="txtmenu">
                        </td>
                    </tr>
                </table>
            </td>
            <td class="cellbackmenuextend">
                &nbsp;
            </td>
        </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td valign="top" bgcolor="#FFFFFF" class="cellbackhmrightextend">
                <table width="745" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td bgcolor="#FFFFFF">
                                        <table width="745" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="172" rowspan="4" valign="top" class="cellbacksubmenu">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td>
                                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                    <tr>
                                                                        <td height="209" valign="top" class="submenu">
                                                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                                                <tr>
                                                                                    <td valign="top" class="cellbackpromobtmextend">
                                                                                        &nbsp;
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td height="30" valign="top">
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td height="350" valign="top">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tr valign="top">
                                                            <td width="12%" height="45">
                                                            </td>
                                                            <td width="53%">
                                                            </td>
                                                            <td width="35%">
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td>
                                                                &nbsp;
                                                            </td>
                                                            <td>
                                                                <h1>
                                                                    Frequent Flyer Program</h1>
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td>
                                                            </td>
                                                            <td>
                                                                <h2>
                                                                    Returning Members</h2>
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td>
                                                            </td>
                                                            <td>
                                                                <form id="loginForm" runat="server">
                                                                <div>
                                                                <asp:TextBox id="account" runat="server"/>
                                                                <asp:TextBox id="password" runat="server"/>
                                                                <asp:Label id="badLogin" runat="server"/>
                                                                </div>
                                                                </form>
                                                                <h2>
                                                                    New Members</h2>
                                                                <p>
                                                                    <a href="Registration.aspx">Enroll in Skyward Airlines Frequent Flyer program.</a>
                                                                </p>
                                                            </td>
                                                            <td>
                                                                <div class="c3">
                                                                    <table width="168" border="0" align="right" cellpadding="0" cellspacing="0">
                                                                        <tr>
                                                                            <td>
                                                                                <img src="images/spic_001.jpg" width="168" height="209" alt="Visual formatting image" />
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td height="30" valign="top">
                                                                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="cellbackhmright">
                                                                                    <tr>
                                                                                        <td width="100%" height="50" bgcolor="#DADADA" class="whiteline">
                                                                                            <table width="100%" border="0" cellspacing="0" cellpadding="6">
                                                                                                <tr>
                                                                                                    <td class="promotext">
                                                                                                        New Frequent Flyer members can now earn 2,000 Bonus Miles for taking their first
                                                                                                        flight.
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        <tr valign="top">
                                                            <td height="30">
                                                            </td>
                                                            <td>
                                                            </td>
                                                            <td>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" bgcolor="#FFFFFF" class="btmmenu">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" bgcolor="#FFFFFF" class="btmmenu">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tr valign="top">
                                                            <td width="12%">
                                                            </td>
                                                            <td width="76%" class="btmmenu">
                                                                <a href="index.htm">Home</a> | Frequent Flyers<br />
                                                                &copy; 2010 Skyward Airlines
                                                            </td>
                                                            <td width="12%">
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td valign="top" bgcolor="#FFFFFF" class="btmmenu">
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
</body>
</html>

This is the error message that I am getting.  Please help me with this one. I am getting better with resolving the issues.  I am down to just this one.

This is homeWork.
Active.pdf
ASKER CERTIFIED SOLUTION
Avatar of BuggyCoder
BuggyCoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AndyAinscow
Airline1, ... Airline10 - IMHO you could do with having a better title to your questions than that.  Experts get an email with that as the info concerning your question
Avatar of assaultkitty
assaultkitty

ASKER

This worked perfectly.  Thank you. I am almost finished with program.  Then I have to start the project.  Wish me good luck. It has to do with regular expression!