the error is self-explanatory: you cannot do redirect because some html data was already sent. Redirect is done using http headers and they can be sent only at the beginning of comunication (before any page data is sent). This is PHP way of handling http response headers.
in other ways - do not try to redirect after you called render() or renderPartial() which sends output. if you sure you do not call render/renderPartial - check if there is no "debug" echoes or BOM headers in your php files…