Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/04/2008, 11:09
roger1187
 
Fecha de Ingreso: marzo-2008
Mensajes: 286
Antigüedad: 16 años, 1 mes
Puntos: 1
duda con funcion iff para variables

hola q tal amigos del foro ....tengo 1 nueva duda
tengo este parametro ..... d insercion

Cita:
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO dbo.fecha (fecha) VALUES (@fecha)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_STRING_cn1") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSett ings("MM_CONNECTION_DATABASETYPE_cn1") %>'
Expression='<%# Request.Form("MM_insert") = "form1" %>'
CreateDataSet="false"
Debug="true"
>
<Parameters>
<Parameter Name="@fecha" Value='<%#IIf(fechaingreso <> Nothing), fechaingreso, "") %>' Type="DateTime" />
</Parameters>

</MM:Insert>
y el fecha ingreso lo saco d esta concatenacion

Cita:
Sub Page_Load(sender as Object, e as EventArgs)
dim fechaingreso as string
:
:
:
fechaingreso = ddlDay.SelectedValue &"/"& ddlMonth.SelectedValue &"/"& ddlYear.SelectedValue
Parameter Name="@fecha" Value='<%#IIf(fechaingreso <> Nothing), fechaingreso, "") %>' Type="DateTime" />

como debo d ingresar mi valor fecha ingreso en el iff.....

Mi problema es q no se como nombrar en la funcion iif
lo q hice fue esto