Users Pricing

forum

Home Forums How to submit web grid in asp.net mvc? – MindStick

How to submit web grid in asp.net mvc?

Anonymous User 3074 11 Oct 2014
I am trying to use a WebGrid to display some data, this is fine but I also want to add a column with a submit button that passes back an id from the model. here is my grid code.

       @{var grid = new WebGrid(source: Model);}
   <div>
        <h2>Multi User Login</h2>
 
        @using (Html.BeginForm())
        {
            @grid.GetHtml(columns: grid.Columns(
            grid.Column("CompanyName"),
            grid.Column("Address"),
            grid.Column(format: @<input type="submit" name="@item.idAddress" value = "select" />)))
 
 
        }
 
</div>


I have tried a number of ways to return the id Address to the controller post method without any luck. How can I do this?

 


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md