Good day
Has one doubts in FormView aspx:
I have fields that it keeps to total minutes in table of my DB, however want that this value is visualized in the FormView in format HH: MM.
For it propose I introduced a INPUT FormView Tempo_Viagem1 inside, Tempo_Viagem2 as much EditItemTemplate as InsertItemTemplate.
would like to know as to make to keep this value actualizados in the DB (Insert, Edit) : field(Tempo_Viagem)=Tempo_Viagem1*60+Tempo_Viagem2
'scrip
code Sub actualiza_valorTempo_Viagem( ByVal sender As Object , ByVal e As EventArgs)
' Code in VB
End Sub
< EditItemTemplate >
< input onblur ="actualiza_valorTempo_Viagem" id ="Tempo_Viagem1" value =" <%# ((eval("Tempo_Viagem")-(eval("Tempo_Viagem") Mod 60)) / 60) %> " size ="1" maxlength ="2" /> :
< input onblur ="actualiza_valorTempo_Viagem" id ="Tempo_Viagem2" value =" <%# (eval("Tempo_Viagem") Mod 60) %> " size ="1" maxlength ="2" />
< asp : TextBox ID ="EditTempo_ViagemTextBox" Text =' <%# Bind("Tempo_Viagem") %> ' RunAt ="Server" />
< InsertItemTemplate >
< input onblur ="actualiza_valorTempo_Viagem" id ="Tempo_Viagem1" size ="1" maxlength ="2" /> :
< input onblur ="actualiza_valorTempo_Viagem" id ="Tempo_Viagem2" size ="1" maxlength ="2" />
< asp : TextBox ID ="InsertTempo_ViagemTextBox" Text =' <%# Bind("Tempo_Viagem") %> ' RunAt ="Server" />
Has one doubts in FormView aspx:
I have fields that it keeps to total minutes in table of my DB, however want that this value is visualized in the FormView in format HH: MM.
For it propose I introduced a INPUT FormView Tempo_Viagem1 inside, Tempo_Viagem2 as much EditItemTemplate as InsertItemTemplate.
would like to know as to make to keep this value actualizados in the DB (Insert, Edit) : field(Tempo_Viagem)=Tempo_Viagem1*60+Tempo_Viagem2
'scrip
code Sub actualiza_valorTempo_Viagem( ByVal sender As Object , ByVal e As EventArgs)
' Code in VB
End Sub
< EditItemTemplate >
< input onblur ="actualiza_valorTempo_Viagem" id ="Tempo_Viagem1" value =" <%# ((eval("Tempo_Viagem")-(eval("Tempo_Viagem") Mod 60)) / 60) %> " size ="1" maxlength ="2" /> :
< input onblur ="actualiza_valorTempo_Viagem" id ="Tempo_Viagem2" value =" <%# (eval("Tempo_Viagem") Mod 60) %> " size ="1" maxlength ="2" />
< asp : TextBox ID ="EditTempo_ViagemTextBox" Text =' <%# Bind("Tempo_Viagem") %> ' RunAt ="Server" />
< InsertItemTemplate >
< input onblur ="actualiza_valorTempo_Viagem" id ="Tempo_Viagem1" size ="1" maxlength ="2" /> :
< input onblur ="actualiza_valorTempo_Viagem" id ="Tempo_Viagem2" size ="1" maxlength ="2" />
< asp : TextBox ID ="InsertTempo_ViagemTextBox" Text =' <%# Bind("Tempo_Viagem") %> ' RunAt ="Server" />