I am using ViewBag.JobNo and it is not working. I am using ViewBag.JobNo in my controller as:
ViewBag.JobNo = "test";
In my View, I am using it as:
@Html.TextBox("txtJobNo", (string)ViewBag.JobNo , new { @class = "col-md-10 form-control" })
I am getting my TextBox empty.
But when I am using ViewBag.Title in place of ViewBag.JobNo, it is working fine.
Please help me, if you have some idea. Thanks..
Ravi PatelPosted Dec 30, 2016, 12:31 AM
@Html.TextBox("txtJobNo", (string)ViewBag.JobNo , new { @class = "col-md-10 form-control" })
Ranjit PowarPosted Dec 29, 2016, 10:57 PM
Fabio Silva LimaPosted Dec 29, 2016, 1:11 PM
ViewBag.JobNo = "fabiosilvalima";Manas MohapatraPosted Dec 29, 2016, 12:26 PM
DeepakPosted Dec 29, 2016, 12:25 PM
I have used the above mentioned codes in the same page, but one is working and other is not.
Fabio Silva LimaPosted Dec 29, 2016, 11:55 AM