1. Formatting Date-time: string.Format("{0:dd/MM/yy}", DateTime.Today)
2. Storing List Data in ViewBag and retrieve the List Data in View Or Getting List Data From ViewBag :
3. If you want to pass multiple different list in a View from ASP .Net MVC Controller Action How can you pass it?
Answer:
In Action: ViewBag.MyClassList = new List<MyClass>() ;
List<MyClass> MyClassList = ViewBag.MyClassList as List<MyClass>;
Returning JSON Data From Server To Client ::
- var data = obj_dal.LoadAllProductCode(TKTCode, "1", allMenu.User.USER_ID.ToString());
- var MaxJson = Json(new { ListProductCode = data});
- MaxJson.MaxJsonLength = 999999999;
- return MaxJson;
- var MaxJson = Json(new { ListOrderBooking = obj_dal.LoadOrderBookingDL(OrderNo, allMenu.User.EMPLOYEE_ID.ToString()) });
- MaxJson.MaxJsonLength = 999999999;
- return MaxJson;
No comments:
Post a Comment