Formview asp.net

Joined
Sep 3, 2007
Messages
1
Reaction score
0
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" />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top