views:

92

answers:

3

I have a asp.net web page where i will navigate pages on the click of the "Next" button

Page1 will got to Page 2 and then page 3 and page4

But in a selection of dropdown in page 1 it decides page 2 should go to page 3 or page 4

How can i know where they set this page navigation? if suppose i need to change the navigation order?

+1  A: 

Perhaps you should consider the ASP.NET Wizard control.

Here are some links that can help you use it:

4guysfromrolla

ScottGu's blog

In a nutshell, the wizard control allows you to designate a discrete set of steps users need to follow. It allows for logic to programmatically decide what to display to the user based on previous choices

Hope this helps!

Josh E
I agree with the proposed solution, but I think the op is asking how to find the source of behavior in an existing solution (i.e. asked to troubleshoot/enhance someone else's work).
Mayo
good point. we'll see what the OP says about the context of the question
Josh E
A: 

There is an event handler associated with the dropdown. Typically the dropdown control is binded to a method declared in the code behind.

<asp:DropDownList ID="ddlTest" runat="server" onselectedindexchanged="ddlTest_SelectedIndexChanged" />

...

protected void ddlTest_SelectedIndexChanged(object sender, EventArgs e)
{
  // do some stuff here...
}

There might also be a client side (JavaScript) event handler associated with the control.

Mayo
A: 

This is what I understand:

Page 1 sets a drop-down value, navigates to Page 2 Page 2 reads the drop-down value from Page 1 and decides to go to Page 3 or 4 based on that

In your postback method on Page 1, you can read the value set in your drop-down and pass it to page 2. Store that value on page 2, and use it in the postback method of page 2 to decide which next page to navigate to.

Eric J.