Question

Does anyone know how i would write the following in WebMatrix ASP.Net Web Pages?

return Content(Constants.Gateway.WebhookNotification.Verify(Request.QueryString["bt_challenge"]));

I think the return Content method is used by MVC only?

Was it helpful?

Solution

It depends on what you want to do with the result of the expression, but you can render it to the browser like this:

@Constants.Gateway.WebhookNotification.Verify(Request.QueryString["bt_challenge"]))

Or you can store it in a variable:

var myVar = Constants.Gateway.WebhookNotification.Verify(Request.QueryString["bt_challenge"]));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top