I am trying to create a drop down list that would take me to the same page but with the value of the last selected option. I got my code to work the first time an item is selected. Once another item is selected, the code direct me to the url/foourl/value instead of foourl/value. Any way to fix this?
<select name="DocSelect" onchange="window.location=value" >
@foreach (var x in Model.ListOfDocs)
{
<option value= "../loandoc/@x.DocumentSetId">@x.DocumentSetName</option>
}
</select>
any way to fix this? I tried many approaches to this problem with no luck.
btw, the foreach loop returns select values like this one
<option value= "../loandoc/108">example1</option>
<option value= "../loandoc/123">example2</option>
Thanks.
If you need to get to the same loandoc page with another value (after slash?), maybe you can try this: