.Net 2.0 Wizard Control/Required Validator javascript error

Discussion in 'ASP .Net' started by =?Utf-8?B?TXJTaG9vdHM=?=, Jul 27, 2007.

  1. Hi,

    Having probs with using the Wizard control and RequiredValidators with .Net
    2.0. Its giving me an 'event' is null javascript error when clicking on
    another wizard step insteading of giving me an validator error message. Code
    follows, any suggestions?

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs"
    Inherits="Sia.Web.WebForm1" %>

    <!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>test Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div id="divBackground" class="WizardContentBackgroundDiv">
    <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" Width="100%"
    Height="300px">
    <WizardSteps>
    <asp:WizardStep ID="wsMyDetails" runat="server" Title="My
    Details">
    <asp:panel id="pnlContent" runat="server" Width="100%">
    <H1>Welcome to the Wizard</H1>
    <P>If you've been here before and have a profile enter your username
    and password
    below.</P>
    <P>If you don't have a profile, please <A tabIndex="6"
    href="NewUser.aspx">click
    here</A>.</P>
    <TABLE cellSpacing="0" cellPadding="0" align="center" border="0">
    <TR>
    <TD>
    <TABLE cellSpacing="5" cellPadding="5">
    <TR>
    <TD>Username:</TD>
    <TD vAlign="top">
    <asp:TextBox ID="txtUsername"
    runat="server" TabIndex="1"></asp:TextBox>
    <asp:RequiredFieldValidator
    ID="valLogin" runat="server" ControlToValidate="txtUsername"
    ErrorMessage="Please enter your
    username" ValidationGroup="grpLogin" EnableClientScript="True"
    Display="Dynamic"></asp:RequiredFieldValidator>
    <asp:ValidationSummary
    ID="ValidationSummaryLogin" runat="server" ValidationGroup="grpLogin" />
    </TD>
    </TR>
    <TR>
    <TD>Password:</TD>
    <TD vAlign="top"></TD>
    </TR>
    <TR>
    <TD> </TD>
    <TD>
    <asp:Button id="btnLogin" tabIndex="3" Runat="server"
    Text="Login"></asp:Button></TD>
    </TR>
    <TR>
    <TD></TD>
    <TD noWrap>
    <P tabIndex="4"><B><FONT size="1">></FONT></B> <A tabIndex="3"
    href="ForgottenPassword.aspx">
    forgotten your password?</A></P>
    <P><B><FONT size="1">></FONT></B> <A tabIndex="5"
    href="NewUser.aspx">new
    profile?</A></P>
    </TD>
    </TR>
    </TABLE>
    </TD>
    <TD vAlign="top"></TD>
    </TR>
    </TABLE>
    </asp:panel>

    </asp:WizardStep>
    <asp:WizardStep ID="wsCourseSelections" runat="server"
    Title="Course Selections">
    Course Selections
    </asp:WizardStep>
    <asp:WizardStep ID="wsFavourites" runat="server"
    Title="Favourites">
    Favorites
    </asp:WizardStep>
    <asp:WizardStep ID="wsCosts" runat="server" Title="Costs">
    <div id="divCosts">
    Costs
    </div>
    </asp:WizardStep>
    <asp:WizardStep ID="wsWhatsNext" runat="server" Title="Whats
    Next">
    <div id="divWhatsNext">
    Whats Next
    </div>
    </asp:WizardStep>
    <asp:WizardStep ID="wsSummary" runat="server" Title="Summary">
    <div id="divSummary">
    Summary
    </div>
    </asp:WizardStep>
    </WizardSteps>
    <StepNavigationTemplate>
    </StepNavigationTemplate>
    <StepStyle BackColor="AntiqueWhite" BorderWidth="5px"
    BorderStyle="Double" Height="100%" VerticalAlign="Top"
    HorizontalAlign="Left"/>
    <NavigationStyle Width="20px" BorderWidth="5px"
    BorderStyle="Double" VerticalAlign="Top" />
    <SideBarStyle BorderStyle="Solid" Height="100%" VerticalAlign="Top"
    Width="180px" />
    <HeaderStyle BorderStyle="Solid" BorderWidth="2px" />
    </asp:Wizard>
    </div>
    </form>
    </body>
    </html>
     
    =?Utf-8?B?TXJTaG9vdHM=?=, Jul 27, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Javascript Validition and Required Validator

    =?Utf-8?B?SmltIEhlYXZleQ==?=, Jan 11, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    486
    bruce barker
    Jan 11, 2005
  2. Replies:
    0
    Views:
    766
  3. Replies:
    1
    Views:
    654
    Nathan Sokalski
    Dec 30, 2007
  4. Andy B
    Replies:
    0
    Views:
    581
    Andy B
    Apr 19, 2008
  5. vikasmalukani
    Replies:
    0
    Views:
    987
    vikasmalukani
    Sep 24, 2008
  6. Sogescom

    required field validator in Web custom control

    Sogescom, Jul 4, 2003, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    490
    Yan-Hong Huang[MSFT]
    Jul 8, 2003
  7. Phil Jones

    Required Field Validator Error ?

    Phil Jones, Sep 23, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    145
    Phil Jones
    Sep 23, 2003
  8. dotnet_nut

    asp.net 2.0 Wizard Control and User Control (.ascx)

    dotnet_nut, Oct 24, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    380
    dotnet_nut
    Oct 24, 2006
Loading...