Solved

asp.net function/wizard

Posted on 2011-09-26
2
174 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 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
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…

728 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