title: How to send multiple parameters using Html.BeginForm() in asp.net mvc?
body: <p>Actually I want to send the image and the text in the textbox to the controller...</p>
  
  <pre><code>@using (Html.BeginForm("Upload", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
      {
           @Html.Label("UserName:") &lt;input type="text" id="txtImg" name="txtImg" /&gt;&lt;br /&gt;&lt;br /&gt;
              @Html.Label("Upload:")&lt;input type="file" name="image" /&gt;&lt;br/&gt;    
          &lt;div id="Preview"&gt;
          Preview
      &lt;/div&gt;
  
          &lt;input class="btn btn-success btnUpload" type="submit" value="upload" /&gt;
  
      }
  </code></pre>
  
  <p>and I am trying to retrieve them in the controller in the below way:</p>
  
  <pre><code> public ActionResult Upload(HttpPostedFileBase image,string txtImg)
  </code></pre>
  
  <p>but I am not getting the textbox value..Is anything wrong withe code?</p>
  
  <p>I have my sample code like this.</p>
  
  <pre><code>Controller:
      public ActionResult Upload()
              {
                  BlobStorageServices _blobstorageservice = new BlobStorageServices();
                  CloudBlobContainer container = _blobstorageservice.GetCloudBlobContainer();
                  List&lt;string&gt; blobs = new List&lt;string&gt;();
                  //List&lt;BlobModel&gt; models = BlobManager.getBlobs();
                  foreach (var blobItem in container.ListBlobs())
                  {
                      blobs.Add(blobItem.Uri.ToString());
  
                  }
                  return View(blobs);
              }
              [HttpPost]
              public ActionResult Upload(string txtImg,HttpPostedFileBase image)
              {
                  if (image.ContentLength &gt; 0)
                  {
                      BlobStorageServices _blobstorageservice = new BlobStorageServices();            
                      CloudBlobContainer container = _blobstorageservice.GetCloudBlobContainer();
                      CloudBlockBlob blob = container.GetBlockBlobReference(image.FileName);
                   //BlobManager.insertBlobUri(new BlobImage { Uri = blob.Uri.ToString() });
                  // string text = model.Name;
                    BlobManager.insertBlobUri(new BlobModel {Name=txtImg,Uri=blob.Uri.ToString()});
                      blob.UploadFromStream(image.InputStream);
                  }
                  return RedirectToAction("Upload");
              }
  
      View
      @using (Html.BeginForm("Upload", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
          {
               @Html.Label("UserName:") &lt;input type="text" id="txtImg" name="txtImg" /&gt;&lt;br /&gt;&lt;br /&gt;      
                  @Html.Label("Upload:")&lt;input type="file" name="image" id="upload"/&gt;&lt;br/&gt;    
              &lt;div id="Preview"&gt;
              Preview&lt;img id="blah" src="#" alt="your image" /&gt;
          &lt;/div&gt;
  
              &lt;input class="btn btn-success btnUpload" type="submit" value="upload" /&gt;
  
          }
  
      &lt;table style="border:1"&gt;
  
          @foreach (var item in Model)
          {
  
              &lt;tr style="border:1"&gt;
  
                  &lt;td&gt;&lt;img src="@item" alt="image" class="img-responsive" width="100" height="100" /&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;button class="btn btn-primary Delete"  id="@item" onclick="deleteImage('@item');"&gt;Delete&lt;/button&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;a class="btn btn-primary Download" href="@item" target="_blank"&gt;Download Image&lt;/a&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;button class="btn btn-primary Download"  onclick="updateImage('@item');"&gt;UpdateImage&lt;/button&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
          }
  </code></pre>
  
  <p>I am sending the blobs directly into the view , that is the problem basically..How to use a model to insert text,bloburl,image?</p>