Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Need help reformatting...

Reply
Thread Tools

Need help reformatting...

 
 
TN Bella
Guest
Posts: n/a
 
      08-09-2004

This may be a double post...
I appreciate all the help I have gotten on here - thank you! So with
that in mind, I figured I would try another post!

I need to reformat the following information like this:

txtacctnum txtcostcntr txtrefnum txtacctamt
txtacctnum1 txtcostcntr1 txtrefnum1 txtacctamt1
txtacctnum2 txtcostcntr2 txtrefnum2 txtacctamt2

Currently it is like this:
txtacctnum
txtacctnum1
txtacctnum2

txtcostcntr
txtcostcntr1
txtcostcntr2







Dim index As Integer

litResponse.text += "<b>Account Number</b>: "
& txtacctnum.Text.ToUpper & "<br>" 'First output for first "txtAcctNum"
box then goes to loop
For index = 1 To 14
If CType(Me.FindControl("txtAcctNum" &
index.ToString()), TextBox).Text <> "" Then 'Condition to check for null
strings & to stop it from displaying.
litResponse.Text += "<b>Account number " &
index & " : </b>" & _
CType(Me.FindControl("txtAcctNum" & index),
TextBox).Text & "<br>"
End If
Next index
litResponse.Text +="<br>"


'The first txtCostCntr can be null if
txtAcctNum = 9
If txtCostCntr.Text<>"" Then
litResponse.text += "<b>Cost Center</b>:
" & txtCostCntr.Text.ToUpper & "<br>"
Else
litResponse.text += "<br>"
End If


For index = 1 To 14
If CType(Me.FindControl("txtCostCntr" &
index.ToString()), TextBox).Text <> "" Then 'Condition to check for null
strings & to stop it from displaying.
litResponse.Text += "<b>Cost center " &
index & " : </b>" & _
CType(Me.FindControl("txtCostCntr" & index),
TextBox).Text & "<br>"
End If
Next index
litResponse.Text +="<br>"

'The first txtRefNum can be null
If txtRefNum.Text<>"" Then
litResponse.text += "<b>Reference
Number</b>: " & txtRefNum.Text.ToUpper & "<br>"
Else
litResponse.text += "<br>"
End If


For index = 1 To 14
If CType(Me.FindControl("txtRefNum" &
index.ToString()), TextBox).Text <> "" Then 'Condition to check for null
strings & to stop it from displaying.
litResponse.Text += "<b>Reference Number "
& index & " : </b>" & _
CType(Me.FindControl("txtRefNum" & index),
TextBox).Text & "<br>"
End If
Next index
litResponse.Text +="<br>"

'litResponse.text += "<b>Account Amount</b>: $"
& txtAcctAmt.Text & "<br>" 'First output for first "txtAcctAmt" box then
goes to loop
Dim DollarText2 as double
Dim TxtBoxVal as string

DollarText2 = Convert.ToDouble(txtAcctAmt.Text)
TxtBoxVal = DollarText2.ToString("C")

'litResponse.text += "<b>Account Amount</b>:
" & txtAcctAmt.Text & "<br>" 'First output for first "txtAcctAmt" box
then goes for loop

litResponse.text += "<b>Account Amount</b>:
" & TxtBoxVal & "<br>" 'First output for first "txtAcctAmt" box then go
for loop

For index = 1 To 14
If CType(Me.FindControl("txtAcctAmt" &
index.ToString()), TextBox).Text <> "" Then 'Condition to check for null
strings & to stop it from displaying.
''''''''''''''
'code to display txtAcctAmt as Dollar
amount

TxtBoxVal =
CType(Me.FindControl("txtAcctAmt" & index.ToString()), TextBox).Text

if (len(TxtBoxVal) > 0) then
DollarText2 =
Convert.ToDouble(TxtBoxVal)
TxtBoxVal = DollarText2.ToString("C")
end if

''''''''''''
litResponse.Text += "<b>Account Amount " &
index & " : </b>" & TxtBoxVal & "<BR>"

End If
Next index
litResponse.Text +="<br>"

litResponse.text+="<b>Account Amount
Total</b>: " & txtAcctAmtSum.text & "<br>"



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Help, I am intermediate in Java...need help in follow case ElementX Java 9 10-01-2008 08:02 PM
Help Help. I really need some help with this =?Utf-8?B?Q2hyaXM=?= ASP .Net 3 01-31-2007 09:33 PM
re_---need help Network Adapters!!!! NEED HELP!!!! hedayatniac@gmail.com Computer Support 4 08-13-2006 01:03 AM
Need help! I need to add lead zeros to a textbox Teep ASP .Net 2 06-21-2004 01:04 PM
Please help!!! Need datagrid selection to fill textboxes...Need quick!! TN Bella ASP .Net 1 06-18-2004 01:31 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57