Reputation:
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?
Upvotes: 0
Views: 383
Reputation: 150148
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.
Upvotes: 0
Reputation: 10812
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.
Upvotes: 0
Reputation: 7432
Perhaps you should consider the ASP.NET Wizard control.
Here are some links that can help you use it:
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!
Upvotes: 1