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..

Fabio Silva LimaRank #750 · 3.1K reputationPosted Dec 29, 2016, 6:55 AM EST
Deepak25 reputationPosted Dec 29, 2016, 7:25 AM EST
I have used the above mentioned codes in the same page, but one is working and other is not.
Manas MohapatraRank #182 · 13.2K reputationPosted Dec 29, 2016, 7:26 AM EST
Fabio Silva LimaRank #750 · 3.1K reputationPosted Dec 29, 2016, 8:11 AM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Dec 29, 2016, 5:57 PM EST
Ravi PatelRank #439 · 5.7K reputationPosted Dec 29, 2016, 7:31 PM EST
@Html.TextBox("txtJobNo", (string)ViewBag.JobNo , new { @class = "col-md-10 form-control" })