Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help

Status
Not open for further replies.

Albano

Instructor
Dec 11, 2000
221
PT
I'm new in ASP programing,so my question may seem to simple.

The problem is wen I use the response.redirect object to redirct to another page it return an Heder error, whay this happens and how can i do to redirct do another page.

This is the full error:

Header Error

/ASP_albano/Imobiliaria/manutencao.asp, line 126

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.

Tanks in advance,

Albano
 
Hello Bastien, tanks for answer me theirs the full code:

------- CODE --------
<%
if session(&quot;userValidate&quot;)=&quot;No&quot; or session(&quot;userValidate&quot;)=&quot;&quot; then
response.redirect(&quot;login.asp&quot;)
else%>
<center><font size=&quot;6&quot; color=&quot;#FF2D96&quot;>Gestão de Imóveis</font></center>
<body bgcolor=&quot;#C5C8F1&quot;>
<br>
<%
select case request.form(&quot;imoveis&quot;)
case &quot;inserir_imovel&quot;
%>
<center>
<form>
<table border=1 width='57%' cellpadding=0 cellspacing=0 bordercolorlight=636331 bordercolordark=efefef>

<tr>
<td>&nbsp;Referência:</td>
<td><input type=&quot;text&quot; name=&quot;ref&quot; size=&quot;10&quot; maxlength=&quot;10&quot;></td>
</tr>

<tr>
<td>&nbsp;Localidade:</td>
<td><input type=&quot;text&quot; name=&quot;localidade&quot; size=&quot;50&quot; maxlength=&quot;50&quot;></td>
</tr>
<tr>
<td>&nbsp;Tipologia:</td>
<td><select name=&quot;tipologia&quot;>
<option selected>- Escolha -</option>
<option value=&quot;T0&quot;>T0</option>
<option value=&quot;T1&quot;>T1</option>
<option value=&quot;T2&quot;>T2</option>
<option value=&quot;T3&quot;>T3</option>
<option value=&quot;T4&quot;>T4</option>
<option value=&quot;T5&quot;>T5</option>
</select>

&nbsp;Ano construção:
<input type=&quot;text&quot; name=&quot;ano_construcao&quot; size=&quot;10&quot; maxlength=&quot;10&quot;>
</td>
</tr>

<tr>
<td>&nbsp;Situação:</td>
<td><select name=&quot;situacao&quot;>
<option selected>- Escolha -</option>
<option value=&quot;Venda&quot;>Venda</option>
<option value=&quot;Aluguer&quot;>Aluguer</option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;Preço escudos:</td>
<td>
<input type=&quot;number&quot; name=&quot;preco_esc&quot; size=&quot;10&quot;>$00
&nbsp;&nbsp;Preço euros:
<input type=&quot;number&quot; name=&quot;preco_euro&quot; size=&quot;10&quot;>€
</td>
</tr>
</table>
<br>

<table border=1 width='57%' cellpadding=0 cellspacing=0 bordercolorlight=636331 bordercolordark=efefef>
<tr>
<td colspan=&quot;6&quot; align=&quot;center&quot;><b>Área:</b></td>
</tr>

<tr>
<td align=&quot;rigth&quot;>&nbsp;Útil:</td>
<td><input type=&quot;number&quot; name=&quot;area_util&quot; size=&quot;10&quot;>m2</td>
<td>&nbsp;Bruta:</td>
<td><input type=&quot;number&quot; name=&quot;area_bruta&quot; size=&quot;10&quot;>m2</td>
<td>&nbsp;Terreno:</td>
<td><input type=&quot;number&quot; name=&quot;area_terreno&quot; size=&quot;10&quot;>m2</td>
</tr>
</table>
<br>
<table border=1 width='57%' cellpadding=0 cellspacing=0 bordercolorlight=636331 bordercolordark=efefef>
<tr>
<td>Oportunidade:&nbsp;<input type=&quot;radio&quot; name=&quot;oportSim&quot;>Sim
&nbsp;<input type=&quot;radio&quot; name=&quot;oportNao&quot;>Não</td>
</tr>
</table>
</form>
</center>
<br>
<center>
<table border=1 width='57%' cellpadding=0 cellspacing=0 bordercolorlight=636331 bordercolordark=efefef>
<tr>
<td align=&quot;center&quot; colspan=&quot;2&quot;><b>Imagens</b></td>
</tr>
<tr>
<td>Nome Imagem:</td>
<td><Input type=&quot;text&quot; size=&quot;50&quot; maxlength=&quot;50&quot; name=&quot;nomeImg&quot;></td>
</tr>

<tr>
<td>Link:</td>
<td><Input type=&quot;text&quot; size=&quot;50&quot; maxlength=&quot;50&quot; name=&quot;linkImg&quot;></td>
</tr>

</table>
</center>
<br>
<center>
<table border=1 width='57%' cellpadding=0 cellspacing=0 bordercolorlight=636331 bordercolordark=efefef>
<tr>
<td align=&quot;center&quot; colspan=&quot;2&quot;><b>Caracteristicas</b></td>
</tr>
<tr>
<td align=&quot;center&quot;><textarea name=&quot;caract&quot; cols=&quot;50&quot; rows=&quot;5&quot;></textarea></td>
</tr>
<table>
</center>
</body>

<%
case &quot;alterar_imovel&quot;
response.write&quot;alterar imovel&quot;
case &quot;apagar_imovel&quot;
response.write&quot;apagar imovel&quot;
end select


if request.form(&quot;utilizadores&quot;)=&quot;inserir_user&quot; then
response.redirect(&quot;utilizadores.asp&quot;)
end if
end if%>
 
In case anyone else looks at this post, to get rid of the header error, add the following line of code at the top of the page:

response.buffer = true
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top