Hi
I am having trouble doing something that is probably pretty simple!
I have a stock listing that is done by 1) a simple form with parameters (\Index) and 2) an ajax called partial view that displays the list of stock (based on the params).
On this same simple form (\Index) I have an action link to an "Add Stock" method which calls another form for adding stock.
When the user has finished adding the stock I redirect them back to the stock list page (\Index).
My issue is that I would like to "remember" the parameters that were initially entered in this form so the user isn't just directed back to a page with blank parameters forcing them to enter them again.
I thought I could simply overload the Index method as such:
Function Index() As ActionResult
Return View(New Stock_ViewModel)
End Function
Function Index(ByVal svm As Stock_ViewModel) As ActionResult
Return View(svm)
End Function
I get this error: The current request for action 'Index' on controller type 'StockController' is ambiguous between the following action methods:...
Now I have read this post and it's answer but I cannot figure out how to implement the solution.
Is this solution applicable in my situation? Is there a better way to acheive what I'm trying to do?
Thanks in advance for any help!