One question of render can't work for ajax request.

Hi All.

There is one ajax request, url is following: http://xxx.com/company/update?id=1&_pjax=%23w0

and the CompanyController/actionUpdate like following:




return $this->renderAjax('update', [

                'model' => $model,

            ]);



But if I changed renderAjax to[color="#FF0000"] render[/color], it don’t return anything, only with status code 200. And then, Chrome explorer refresh, direct to http://xxx.com/company/update?id=1.

Normally, if we use render not renderAjax, it will return complete HTML page with layout.

but if i use render with ajax request, it don’t return anything, it’s very strange.

PS: Generally, we make use of renderAjax in action or pjax widget in view to respond ajax request. But i really want to know why method “render” don’t return anything when respond ajax request. what’s the truth.