Solved

asp.net function/wizard

Posted on 2011-09-26
2
169 Views
Last Modified: 2012-05-12
Please read the attached code. It is working fine but I want to edit like the following:

protected void SkipStep(string  wizard.currentstepindex, string dropdownvalue)
{
if (currentstepindex=="0" && dropdownvalue > 5)
    WizardFirmingIndustryQuote.ActiveStepIndex = 2;
}

Basically, I just need to add more parameter for the function.
and I would like to save into App_Code as well.

Experts: How can I do that? and 500 points for completed / working codes.

Thanks,
protected void SkipStep(object sender, WizardNavigationEventArgs e)
    {
        //================================================================================
        //Rule Section
        //If GL Or AUTO is selected in PreQuote.aspx
        //show ShortTermGLandAL1
        //If 'Rented Production Equipment' Or 'Owned Production Equipment' Or 'Medical' is selected in PreQuote.aspx
        //Show ShortTermProductionEquipment1
        //================================================================================
        if (e.CurrentStepIndex == 0 && Int32.Parse(DropDownList1.SelectedItem.Value) > 5)
           WizardFirmingIndustryQuote.ActiveStepIndex = 2;        
    }

Open in new window

0
Comment
Question by:Webboy2008
  • 2
2 Comments
 
LVL 8

Expert Comment

by:jagrut_patel
ID: 36708713
SkipStep is a event-handler method. You cannot change its signature.
0
 
LVL 8

Accepted Solution

by:
jagrut_patel earned 500 total points
ID: 36708732
You can extract a new method out of your current code in SkipStep event-handler.
Something like this,

void NewMethod(string currStepIndex, string dropdownvalue)
{
        if (currStepIndex == 0 && dropdownvalue > 5)
           WizardFirmingIndustryQuote.ActiveStepIndex = 2;    
}

Call this method from SkipStep like

NewMethod(e.CurrentStepIndex, Int32.Parse(DropDownList1.SelectedItem.Value));
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now