Search code examples
asp.net-mvc-3actionlink

How to handle the ID from an actionlink to show this in a readonly textbox


I have a lot of tables. Each table has an incremental int ID and a company guid id. I made an with the company guid as id param. Like this:

@Html.(@item.Bedrijfsnaam.ToString(), "Edit", "BedrijfsGegevens", new { id = (Guid)item.Bedrijfsnummer }, null)

When I click on this I want to fill a readonly textboxfor on a different view from a different model with this guid.

The guid is passed properly but then.......what to do?

Thanks in advance.

Cheers


Solution

  • click on what, a link? I'm assuming you forgot the .Actionlink in front of that @HTML. If its a link, take a look at the @Ajax.Actionlink method and then on the onsuccess, trigger some javascript/jquery to fill in a div/cell/textbox or whatever you'd like with the data you return.