Ciao a tutti ringrazio in anticipo per la vs pazienza
cmq avrei u piccolo problema
ho creato una pag asp che mi consente di inseriredei dati in un db
fin qua tutto ok, ma seuno dei campi è vuoto mi dà errore
quindi avevo pensato di mettere un controllonel ricevere i dati in modo tale che se il campo risultasse vuoto attraverso questo controllo vado a mettere in questo campo il trattino ad es

posto il codice della pagina e
codice:
<%@LANGUAGE = JScript%>

<%
   /*
        
   */
	
	var azione = new String(Request.QueryString("azione"))
%>
<html>
 <head>
	<title>Inserisci una Nuova Offerta</title>
	<style type="text/css">
		td, p, input, textarea { font-size: 12px; font-family: Verdana; }
		a { color: #000080; text-decoration: None; }
		a:hover { color: #800000; text-decoration: Underline; }
	</style>
 </head>
<body topmargin="3">

<table align="center" width="450" cellpadding="1" cellspacing="2" style="border: Solid 1px #000000;">
<form method="post" action="privataadmin1.asp?azione=InserisciNews">
	<tr>
		<td bgcolor="#cc3300" colspan="2" height="20"><font color="#FFFFFF">Inserisci una Nuova Offerta</a></td>
	</tr>
	<tr>
	
	
		<td>
			<%if (azione == "undefined") {%>

			
<p align="center">Click
			<input type="text" name="click"  value="0" style="width: 80px">
			Codice
			<input type="text" name="codice" style="width: 80px"></p>
			Titolo

			<input type="text" name="titolo" style="width: 100%">


			SottoTitolo

			<input type="text" name="sottotitolo" style="width: 100%">


			Articolo 1

			<input type="text" name="det1" style="width: 100%">

			Articolo 2

			<input type="text" name="det2" style="width: 100%">

			Articolo 3

			<input type="text" name="det3" style="width: 100%">

			Articolo 4

			<input type="text" name="det4" style="width: 100%">

			Articolo 5

			<input type="text" name="det5" style="width: 100%">

			Articolo 6

			<input type="text" name="det6" style="width: 100%">

			Articolo 7

			<input type="text" name="det7" style="width: 100%">

			Articolo 8

			<input type="text" name="det8" style="width: 100%">


			Prezzo

			<input type="text" name="prezzo" style="width: 100%">

			Descrizione

			<textarea name="descrizione" style="width: 100%; height: 60px;"></textarea>

			<div align="right"><input type="submit" value="Inserisci"></div>
			<%
			}
			else if (azione == "InserisciNews")
			{
				
				var codice = new String(Request.Form("codice"));
				var titolo = new String(Request.Form("titolo"));
				var prezzo = new String(Request.Form("prezzo"));
				var sottotitolo = new String(Request.Form("sottotitolo"));
				var click = new String(Request.Form("click"));
				var det1 = new String(Request.Form("det1"));
				var det2 = new String(Request.Form("det2"));
				var det3 = new String(Request.Form("det3"));
				var det4 = new String(Request.Form("det4"));
				var det5 = new String(Request.Form("det5"));
				var det6 = new String(Request.Form("det6"));
				var det7 = new String(Request.Form("det7"));
				var det8 = new String(Request.Form("det8"));
				if  (det8 == ""){det8=="-"} 

				var descrizione = new String(Request.Form("descrizione"));
					if (titolo == "" || titolo == "undefined" || titolo.charAt(0) == " " || descrizione == "" || descrizione == "undefined" || descrizione.charAt(0) == " ")
					{
						Response.Redirect("privataadmin1.asp");
					}
					else
					{
						var oggi = new Date();
						var data = oggi.getDate() + "/" + (oggi.getMonth() + 1) + "/" + oggi.getYear();
						var Rs = new ActiveXObject("ADODB.Recordset");
							Rs.Open("offerte",Cn,3,3);
								Rs.AddNew();
									Rs("codice") = codice;
									Rs("data") = data;
									Rs("titolo") = titolo;
									Rs("descrizione") = descrizione;
									Rs("prezzo") = prezzo;
									Rs("sottotitolo") = sottotitolo;
									Rs("click") = click;
									Rs("det1") = det1;
									Rs("det2") = det2;
									Rs("det3") = det3;
									Rs("det4") = det4;
									Rs("det5") = det5;
									Rs("det6") = det6;
									Rs("det7") = det7;
									Rs("det8") = det8;
								Rs.Update();
							Rs.Close();
						Response.Write("<p align='center'>News inserita con successo!
Nuova</p>");
					}
			}
			else
			{
				Cn.Close();
				Response.Redirect("logout.asp");
			}
			%>
		</td>
	</tr>
</form>
</table>

<p align="center">Indietro</p>

</body>
</html>
<%Cn.Close()%>
avevo pensato una cosa del genere correggetemi se scrivo caz..te
if (det8 == ""){det8=="-"}

so che sbaglio sicuramente qualcosa soprattutto nella sintassi
ringrazio ancora
ciaoooooooo