?
Solved

asp.net function/wizard

Posted on 2011-09-26
2
Medium Priority
?
177 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

807 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