my application is asp.net I am passing a variable from the controller to a view using:
public ActionResult Create(long? learnerID)
{
learnerID = 211;
ViewBag.learnerID = learnerID.Value;
return View();
}
In the view:
<input type="text" value="<%= ViewBag.learnerID %>" id="Learner_ID" name="Learner_ID" />
The value 211 shows in form and I can save it, however if I change the input type to hidden or use style=”display:none” I get the following error:
The call is ambiguous between the following methods or properties: 'System.IO.TextWriter.Write(string, params object[])' and 'System.IO.TextWriter.Write(char[])'
Would appreciate your suggestions. Thanks in advance.
Try adding a call to ToString()