Reputation: 11011
I am working with a page and basically if my user isn't authenticated I want to show the user the HTML on the Web Form page, otherwise I want the response to be JSON and kill whatever would be on the page... does anyone have any idea of how I could do this? Can you tell me the way to get to the response before the view does?
Thanks
Upvotes: 0
Views: 908
Reputation: 44941
For the JSON track, you could do Response.Clear()
, Response.Write()
your json data, then Response.End()
to send the json and not process the standard page.
Upvotes: 2