---
title: "How can I access formcollection values in action method through ASP.NET mvc ?"  
description: "How can I access formcollection values in action method through ASP.NET mvc ?"  
author: "Royce Roy"  
published: 2017-06-20  
updated: 2017-06-21  
canonical: https://www.mindstick.com/forum/34311/how-can-i-access-formcollection-values-in-action-method-through-asp-dot-net-mvc  
category: "asp.net"  
tags: ["asp.net", "asp.net mvc", "mvc"]  
reading_time: 1 minute  

---

# How can I access formcollection values in action method through ASP.NET mvc ?

hello!

I have formcollection accessed in [action method](https://www.mindstick.com/forum/160300/how-to-pass-data-to-an-httppost-action-method-in-a-dot-net-core-api), but not [getting the value](https://www.mindstick.com/forum/182/problem-in-getting-the-value-from-array-by-using-foreach-loop) of it .

I have written the following [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii):

```
string value = collection[1];
```

But I [am unable](https://answers.mindstick.com/qa/95314/how-do-i-access-a-group-link-in-telegram-if-i-am-unable-to-access-the-link) get the value.

Help me, how can I [access](https://www.mindstick.com/articles/12994/how-foreigners-can-access-blocked-websites-in-china) the value in action method.

I want to access [form](https://www.mindstick.com/forum/6/multi-form-mfc-application) value using form [collection](https://www.mindstick.com/articles/1718/collections-in-java)

## Replies

### Reply by Royce Roy

Thanks Manish...\
It solved my problem in accessing the [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) in [action](https://www.mindstick.com/forum/155752/what-is-action-result-with-its-types) [method](https://www.mindstick.com/forum/166/webservice-method).. It really helped me a lot...

### Reply by Manish Kumar

view code

```
<div>        @using (Html.BeginForm("SignUp","Home",FormMethod.Post))        {        <fieldset>            <legend>                Registration             </legend>            Name:@Html.TextBox("t1")                Address:@Html.TextBox("t2")                Email:@Html.TextBox("t3")            <input type="submit" text="Submit" />        </fieldset>        }    </div>
```

## controller code

You can access values like this

```
       [HttpPost]        public ActionResult SignUp(FormCollection form)        {            string name = form["t1"];            string address = form["t2"];            string Email = form["t3"];            return View();        }
```


---

Original Source: https://www.mindstick.com/forum/34311/how-can-i-access-formcollection-values-in-action-method-through-asp-dot-net-mvc

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
