Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [HttpPost]
- public async Task<IActionResult> GetDocument(SearchFiltersModel filters)
- {
- var model = await _service.GetDocument(filters);
- TempData["Detail"] = model;
- return Json("document/detail/" + model.DocumentID)
- }
- [HttpGet]
- public IActionResult Detail(int id)
- {
- // getting error at line below.
- /// ArgumentNullException: Value cannot be null. Parameter name: dictionary
- var model = TempData["Detail"] as DocumentModel;
- return View(model);
- }
- $('btn').click(function(){
- $.ajax({
- type: 'POST',
- data: filters,
- url: 'document/getdocument'
- })
- .done(function (response) {
- window.location = response;
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement