I have a little bit simple but complicated situation in mvc.I want to pass a string value with form submit to controller through javascript.e.g
@using (Html.BeginForm("ProcessSubmit", "Upload",
FormMethod.Post, new { id = "uploadForm", enctype = "multipart/form-data" })) {
@(Html.Telerik().Upload()
.Name("attachments")
)
here above is a form with action name ProcessSubmit. Now there is another <div> which has a textbox value e.g
<div >
<input type="text" name="fname" />
</div>
and in last div , there is a submit button
<div style="margin: 20px 0 0 0;">
<input type="submit" value="Send" class="t-button" />
</div>
Know i want to get two parameters , one attachement has value and it works but how to get textbox value with form in controller
[HttpPost]
public ActionResult ProcessSubmit(IEnumerable<HttpPostedFileBase> attachments , string fname )
{
if (attachments != null)
{
}
return RedirectToAction("SyncUploadResult");
}
so how to pass textbox value to fname.
This post has been edited by Atli: 19 July 2012 - 11:11 AM
Reason for edit:: Please use [code] tags when posting code.

New Topic/Question
Reply


MultiQuote





|