[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

asp.net function/wizard

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

656 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