me parece que ha había leído algo sobre este tema (creo que estas duplicando post)
Tu codigo (al leerlo rápido dice)
+ SI la variable num_serie3_1 viene vacia
+ Muéstreme el formulario
+ recoger las variables
+ inserte las variables en blanco
+ listo
por eso asocio te inserta el registro en blanco al entrar a la pagina porque a ley esta insertado el valor en blanco
ummm mi idea seria:
Código ASP:
Ver original<%
if num_serie3_1 = "" then
%>
<form method="Post" action="agregacelular.asp">
<table width="308" border="2" align="center" cellpadding="1" cellspacing="0" name="tabla">
<tr><td colspan=2 align="center" class="Estilo5">Agregar Nuevo CELULAR</td>
</tr>
<tr><td colspan="2" height=5></td></tr>
<tr>
<td width="38%" nowrap class="Estilo4">Número de Serie:</td>
<td colspan="2">
<input name ="text1" size="25" maxlength="15"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Equipo:</td>
<td colspan="2">
<input name="text2" size="25" maxlength="20"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Modelo:</td>
<td colspan="2">
<input name="text3" size="25" maxlength="10"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Mac:</td>
<td colspan="2">
<input name="tetx4" size="25" maxlength="17"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Pin:</td>
<td colspan="2">
<input name="text5" size="25" maxlength="8"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Accesorios</td>
<td colspan="2">
<input name="text6" size="25" maxlength="200"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Fecha Entrega Celular</td>
<td colspan="2">
<input name="text7" size="25" maxlength="10"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Fecha Retiro Celular</td>
<td colspan="2">
<input name="text8" size="25" maxlength="10"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Asigando</td>
<td colspan="2">
<input name="text9" size="25" maxlength="50"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">No Asignado</td>
<td colspan="2">
<input name="text10" size="25" maxlength="50"><BR>
</td>
</tr>
<tr>
<td width="38%" nowrap class="Estilo4">Notas</td>
<td colspan="2">
<input name="text11" size="25" maxlength="200"><BR>
</td>
</tr>
<tr>
<td colspan="6" align="center">
<input type="Submit" value=" Agregar " onClick="return window.confirm('Desea Ingresar el registro')">
</td>
<td width="13%"></td>
</tr>
</table>
<%
else
%>
<%
num_serie3_1 = request.Form("text1")
equipo3_1 = request.Form("text2")
modelo3_1 = request.Form("text3")
mac3_1 = request.Form("text4")
pin3_1 = request.Form("text5")
accesorios3_1 = request.Form("text6")
fecha_entrega_celular3_1 = request.Form("text7")
fecha_retiro_celular3_1 = request.Form("text8")
asignado3_1 = request.Form("text9")
no_asignado3_1 = request.Form("text10")
notas3_1 = request.Form("text11")
SQL3_1 = "INSERT INTO CELULAR (NUM_SERIE, EQUIPO, MODELO, MAC, PIN, ACCESORIOS, FECHA_ENTREGA_CELULAR, FECHA_RETIRO_CELULAR, ASIGNADO, NO_ASIGNADO, NOTAS) VALUES " & "('" & num_serie3_1 & "', '" & equipo3_1 & "', '" & modelo3_1 & "', '" & mac3_1 & "', '" & pin3_1 & "', '" & accesorios3_1 & "', '" & fecha_entrega_celular3_1 & "', '" & fecha_retiro_celular3_1 & "', '" & asignado3_1 & "', '" & no_asignado & "', '" & notas3_1 & "')"
set obj_conn3_1=server.createobject("ADODB.connection")
obj_conn3_1.open "PRUEBA"
obj_conn3_1.execute sql3_1
obj_conn3_1.Close
set obj_conn3_1 = Nothing
%>
</form>
<%
End if
%>
linea 97, 98, 99 adicione
consejo
+ busca ayuda sobre on error resume next para que le mande un error mas descriptivo al usuario
+ al final después de insertado dile al usuario "en hora buena has insertado correctamente un registro
+ coloca un enlace que diga "insertar otro?????"
suerte