Hello everybody,
First sorry for my bad english, i'm french. I'll try to make me understand :)
I'd like to pass a parameter from view to controller without using the url.
Why? Because the parameter is a userid and I don't want somebody change it manually in the url.
My code in view :
<% foreach (var item in ViewData["ClientsList"] as List<SalesCoverseal_V2.Models.Customer>)
{ %>
<tr>
<td>
<%: Html.ActionLink("Editer", "ClientEdit", new { id=item.PersonId }) %>
<%: Html.ActionLink("Faire une offre", "Index", new { controller
= "Offer", id=item.PersonId }) %>
In controller :
public ActionResult Index(string id)
{
if (currentLoginUser != null)
{
CurrentCustomer = WebService.GetClientInfos(id);
SessionManager.CurrentCustomer = CurrentCustomer;
OfferViewModel viewmodel = new OfferViewModel();
return View(viewmodel);
}
My url : http://localhost:50905/Offer/Index/WS00000401
But I don't want this url, I want http://localhost:50905/Offer/
Can you help me? I'm going crazy!
Thank you,
Lore