aspnet / Razor

[Archived] Parser and code generator for CSHTML files used in view pages for MVC web apps. Project moved to https://github.com/aspnet/AspNetCore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HttpContext is null

mattman73 opened this issue · comments

Hi all
I need some help I have been working on a way to load a page from within the program.cs file but I can not work out how this is done I have look on the web to find the answer but for the life of me, I cannot find anything that will work.
What I'm looking to do is after a lookup I need to load the page again with an added searchstring, I have all the code doing the look up and cross-checking but I'm unable to get the code to redirect to the page again with the added searchstring.
I have tried to DI the Httpcontext but this keeps returning null.
any pointers would be great.

commented

Closing this as a dupe of: aspnet/Mvc#8449

Hi Still not found a fix for this issue, why I can not see the HttpContext in the program.cs code.