?
Solved

asp.net function/wizard

Posted on 2011-09-26
2
Medium Priority
?
175 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

765 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