Steve,
I have some questions:
1- There are some versions ASP.NET 2.0 from the
www.asp.net web site :
a- .NET Framework 2.0 SDK x86,
b- .NET Framework Version 2.0 Redistributable Package (x86)
c- .NET Framework 2.0 SDK x64
d- .NET Framework Version 2.0 Redistributable Package x64 (64
Bit)
e- .NET Framework 2.0 SDK IA64
f- .NET Framework Version 2.0 Redistributable Package IA64
(64 Bit)
Which one do you suggest me to download ?
2- After downloading, do you think this code will work OR I should
change something ?
Sub txtFUEL_ISSUED1 _TextChanged(se nder As Object, e As EventArgs)
Dim strScript As String = "<script language=JavaSc ript>"
If IsNumeric(txtFU EL_ISSUED1.text ) OR
txtFUEL_ISSUED1 .text="" Then
Dim aValue as double=0.0
If IsNumeric(txtFU EL_ISSUED1.text ) Then
aValue=CDBL(txt FUEL_ISSUED1.Te xt)
End If
' ADD the value to the TOTAL field
ViewState("FUEL _ISSUED_Total") =
ViewState("FUEL _ISSUED_Total") + aValue - ViewState("FUEL _ISSUED1")
txtFUEL_ISSUED_ Total.text=Form atNumber(ViewSt ate("FUEL_ISSUE D_Total"),
2, , ,TriState.True)
ViewState("FUEL _ISSUED1") = aValue
strScript = strScript &
"document.form1 .txtFUEL_ISSUED 2.focus();" 'FOCUS on the next field
Else 'FOCUS on the current field
strScript = strScript &
"document.form1 .txtFUEL_ISSUED 1.focus();"
End If
strScript = strScript & "<" & "/script>"
If (Not Page.IsStartupS criptRegistered ("clientScript" )) Then
Page.RegisterSt artupScript("cl ientScript", strScript)
End If
End Sub
=============== =============== =============== ======
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I suggest you upgrade to ASP.NET 2.0, which has new features that satisfy
all your requests.
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"bienwell" <bi******@hotma il.com> wrote in message
news:%2******** *******@TK2MSFT NGP15.phx.gbl.. . Hi,
I have a problem and really need your help. In my web page ASPX, I have
some text fields to accept data from users. I did form validation like
this :
<td class="dataTD" style="HEIGHT: 30px" width="100">
<asp:TextBox id="txtFUEL_ISS UED1" style="Z-INDEX: 100; POSITION:
absolute" runat="server" Width="107px" BorderColor="Tr ansparent"
autoPostback="t rue"
OnTextChanged=" txtFUEL_ISSUED1 _TextChanged"></asp:TextBox>
</td>
<td class="dataTD" style="HEIGHT: 30px" width="100">
<asp:CompareVal idator id="CompareVali dator1"
runat="server" Width="90px" ControlToValida te="txtFUEL_ISS UED1"
ForeColor="Ligh tCoral" ErrorMessage="P lease enter a number!"
Operator="DataT ypeCheck" Type="Double"></asp:CompareVali dator>
</td>
In the txtFUEL_ISSUED1 _TextChanged, I checked if data on this field is
valid or not. If it's valid then I add this value in the TOTAL field. I'd
to to set focus on the next field when this data IS VALID, OR focus on
this field when data IS NOT valid . Can you help me ? Thanks in advance