Validation Groups and Wizard step

Discussion in 'ASP .Net Web Controls' started by David Thielen, Jan 23, 2007.

  1. David Thielen, Jan 23, 2007
    #1
    1. Advertising

  2. David Thielen

    bhavesh Guest

    hi David,

    If u r using ASP.NET 2.0 then u can have the validationgroup property
    of button.

    so For Ex.

    If you have following two requiredfield validators...

    <asp:reqfva id="test1" runat="server" validationgroup="Group1"
    controltovalidate="txt1">
    <asp:reqfva id="test1" runat="server" validationgroup="Group2"
    controltovalidate="txt2">

    now if u will define a button like

    <asp:button id="button1" runat="server" Text="test"
    validationgroup="Group1">

    Now when u will press "test" button then u will get ur validator firing
    for only txt1.

    execuse for syntax.

    hop this will help.

    u can ask for any further query.





    David Thielen wrote:
    > Hi;
    >
    > In a wizard step I have two validation groups. I need one of them tied to
    > the Next button for that step only. How can I do this?
    >
    > --
    > thanks - dave
    > david_at_windward_dot_net
    > http://www.windwardreports.com
    >
    > Cubicle Wars - http://www.windwardreports.com/film.htm
     
    bhavesh, Jan 23, 2007
    #2
    1. Advertising

  3. The problem is that the wizard Next button is not available.

    --
    thanks - dave
    david_at_windward_dot_net
    http://www.windwardreports.com

    Cubicle Wars - http://www.windwardreports.com/film.htm




    "bhavesh" wrote:

    > hi David,
    >
    > If u r using ASP.NET 2.0 then u can have the validationgroup property
    > of button.
    >
    > so For Ex.
    >
    > If you have following two requiredfield validators...
    >
    > <asp:reqfva id="test1" runat="server" validationgroup="Group1"
    > controltovalidate="txt1">
    > <asp:reqfva id="test1" runat="server" validationgroup="Group2"
    > controltovalidate="txt2">
    >
    > now if u will define a button like
    >
    > <asp:button id="button1" runat="server" Text="test"
    > validationgroup="Group1">
    >
    > Now when u will press "test" button then u will get ur validator firing
    > for only txt1.
    >
    > execuse for syntax.
    >
    > hop this will help.
    >
    > u can ask for any further query.
    >
    >
    >
    >
    >
    > David Thielen wrote:
    > > Hi;
    > >
    > > In a wizard step I have two validation groups. I need one of them tied to
    > > the Next button for that step only. How can I do this?
    > >
    > > --
    > > thanks - dave
    > > david_at_windward_dot_net
    > > http://www.windwardreports.com
    > >
    > > Cubicle Wars - http://www.windwardreports.com/film.htm

    >
    >
     
    David Thielen, Jan 23, 2007
    #3
  4. Dave,

    You could define your own controls for the step navigation template:

    <StepNavigationTemplate>
    <asp:Button ID="prevButton" runat="server"
    CommandName="MovePrevious" Text="Prev" />
    <asp:Button ID="nextButton" runat="server"
    CommandName="MoveNext" Text="Next" ValidationGroup="Test" />
    </StepNavigationTemplate>


    ===============
    #Wizard.StepNavigationTemplate Property (System.Web.UI.WebControls)
    http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.wizard.st
    epnavigationtemplate.aspx

    The StepNavigationTemplate object that is contained in the
    StepNavigationTemplate property must contain two IButtonControl controls,
    one with its CommandName property set to "MoveNext" and one with its
    CommandName property set to "MovePrevious", to enable the navigation
    feature.

    ===============


    Hope this helps.

    Regards,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jan 23, 2007
    #4
  5. Good solution. Thank you for sharing in the community.

    Regards,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jan 24, 2007
    #5
    1. Advertising

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. jaap de verwant slachter
    Replies:
    0
    Views:
    1,290
    jaap de verwant slachter
    Jul 1, 2003
  2. Roy in

    need step by step example

    Roy in, Aug 3, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    376
    Roy in
    Aug 3, 2003
  3. Steve Richter

    a step by step page

    Steve Richter, May 3, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    389
    Steve Richter
    May 3, 2005
  4. =?Utf-8?B?VmVhcg==?=

    Validation process to cancel New user Wizard step?

    =?Utf-8?B?VmVhcg==?=, Apr 23, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,245
    =?Utf-8?B?VmVhcg==?=
    Apr 23, 2006
  5. David Thielen

    3 step wizard - ignore last step

    David Thielen, Oct 23, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    250
    Steven Cheng[MSFT]
    Oct 24, 2006
Loading...

Share This Page