문제

What I'm talking aboit is having a controller like:

[HttpPost, ValidateResult(false)]
public String Preview(String value) {
    return BBCode.ToHtml(value);
}

So user can reference it by url. Is that normal? Probably this is not a high priority question, but I'm just curious?

Thanks!

도움이 되었습니까?

해결책

Normally controller actions should return ActionResults. So a more correct version of your code would be:

[HttpPost, ValidateResult(false)]
public ActionResult Preview(String value) {
    return Content(BBCode.ToHtml(value));
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top