Código:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% dim id_usuario, usuario id_usuario = Session("id_usuario") usuario = Session("usuario") dim id_status, id_empresa, tipoDoc, idTramite id_status = Session("id_status") %> <!--#include file="config.asp" --> <!--#include virtual="/Funciones/conexion.asp"--> <% dim strSql, strSQL1, titulo, desc, opcCon, tipo dim Rs, idc, rs1 idc = request.QueryString("idc") if idc = "1" then titulo = request.Form("txtTitulo") desc = request.Form("txtdesc") opcCon = request.Form("opcCon") tipo = request.Form("selectipo") fecha = request.Form("txtFBaja") strSQL1 = "insertDocumentacion '"&titulo&"','"&desc&"',"&tipo&",'"&fecha&"',"&opcCon&","&id_usuario&"" Set Rs1 = CreaRs(strSQL1) idTramite = Rs1("iddocumento") if not idTramite = "" then '''aqui es donde tengo el problema response.Redirect("ventanillaunicaDestinatario.asp?idTramite="&idTramite) else response.Write("buenas") response.End end if end if %> <html> <head> <title>.:: Agencia Ambiental ::.</title> <link href="css/standar.css" type="text/css" rel="StyleSheet" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="validacion/messages.css" /> <script type="text/javascript" src="validacion/messages10.js"></script> <!--#include file="menu.asp"--> </head> <body onload="writeMenus()" > <iframe width="199" height="178" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js" src="/calendario/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; left:-500px; top:0px;"> </iframe> <div style="position:absolute;left:5px;top:0px;width:100%;height:75%;"> <!--#include file="top.asp" --> <div id="menuadmin"> <!--#include file="incs/MnuInicio.asp" --> </div> <div style="position:absolute;left:170px;top:130px;width:80%;height:auto;"> <br /> <form method="post" action="ventanillaunica.asp?idc=1" name="formBajaTramite"> <table width="600" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td height="40" valign="top"> Ventanilla Unica <br /> <hr /></td> </tr> <tr> <td height="50" valign="top"> <p class="MsoNormal" style="margin: 0cm 0cm 10pt"> <span style="font-size: 11pt; font-family:arial">Registro de Documentos</span>.</p> </td> </tr> <tr> <td height="30" valign="top" style="text-align:center;"> <input id="Text1" style="width: 184px" type="text" name="txtTitulo" /><br /> Titulo Documento</td> </tr> <tr> <td height="30" valign="top" style="text-align:center;"> <select id="Select2" style="width: 186px" name="selectipo"> <% strSQL = "select * from cat_tipo_documentacion" Set Rs = CreaRs(strSQL) Do while not Rs.Eof IF Rs("id_tipo_documentacion") = tipo THEN %> <option value="<%=Rs("id_tipo_documentacion")%>" selected="selected"><%=Rs("tipo_documentacion")%></option> <% Else %> <option value="<%=Rs("id_tipo_documentacion")%>"><%=Rs("tipo_documentacion")%></option> <% End If Rs.MoveNext Loop %> </select> <br /> Tipo de Documento</td> </tr> <tr> <td height="30" style="text-align: center" valign="top"> <textarea id="TextArea1" rows="2" style="width: 305px" name="txtdesc" cols=""></textarea><br /> Descripcion del Documento</td> </tr> <tr> <td height="30" style="text-align: center" valign="top"> <input name="txtFBaja" readonly="readonly" type="text" value="<%'=fecha_inicio_operaciones%>" /> <a hidefocus="" href="javascript:void(0)" onclick="if(self.gfPop)gfPop.fPopCalendar(document.formBajaTramite.txtFBaja);return false;" onmouseout="window.status='Fecha';return true;" onmouseover="window.status='Fecha';return true;" title="Fecha"> <img align="absMiddle" border="0" height="22" name="popcal" src="/calendario/calendario.gif" width="34" /></a></td> </tr> <tr> <td height="30" valign="top" style="text-align:center;"> <input id="Radio1" type="radio" name="opcCon" value="1" /> Escanear Archivo | <input id="Radio2" type="radio" name="opcCon" value="0" /> Proceso Terminado </td> </tr> <%if idc = "" then%> <tr> <td height="30" style="text-align: center" valign="top"> <input type="submit" name="Submit" value="Continuar" /></td> </tr> <%end if%> <tr> <td height="24" valign="top"><hr /></td> </tr> </table> </form> <br /> <%if idTramite <> "" then%> <form method="post" action="script/insfechainhabil.asp?idc=1" onsubmit="return validate(this)"> <table width="600" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td height="30" valign="top" style="text-align:center;"> <input id="Text2" style="width: 309px" type="text" name="txtBus" /></td> </tr> <tr> <td height="30" valign="top" style="text-align:center;"> <input id="Submit1" type="submit" value="Persona | Depto" /></td> </tr> <tr> <td height="30" valign="top"> <table width="600" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td><b>Personal/Depto</b></td> <td><b>Tipo</b></td> </tr> <tr> <td></td> <td></td> </tr> </table> </td> </tr> <tr> <td height="30" valign="top" style="text-align:center;"> </td> </tr> <tr> <td height="30" valign="top" style="text-align:center;"> </td> </tr> <tr> <td height="24" valign="top"><hr /></td> </tr> </table> </form> <%end if%> <!-- TEMRINA CÓDIGO --> </div> </div> </body> </html>