•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 430,115 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,265 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 446 | Replies: 1
![]() |
•
•
Join Date: Aug 2007
Posts: 21
Reputation:
Rep Power: 2
Solved Threads: 0
i am working on online railway reservation project in vb.net. i want to know after entering reservation details by user in a table where user can made only 6 person's reservation e.g train_no,source,destination,name,class,berth,age, senior citizen then how to calculate sum of ticket price of all the 6 persons when button is clicked.and how to display total amount on next page please send me this code
urgently.
urgently.
Assuming that you are using a datatable(SQLTable) and you have a column like "ticket_price" for each person then you can use a span to show the total
In ASPX
In Code
In ASPX
<span id="lblTotal" runat="server">Total</span>
In Code
Dim Row as DataRow
Dim Total as Decimal = 0
For Each Row in SQLTable.Rows
Total = (Total + Row("ticket_price"))
Next
lblTotal.innerhtml = Total![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- I love this spam! (Geeks' Lounge)
- display total amount (VB.NET)
- Calculate the amount of time in the linux process using perl script (Perl)
- Memory retrieval (Java)
- Program design (help) (C++)
- Cannot get method in project to work (Java)
- Free space? (*nix Software)
Other Threads in the ASP.NET Forum
- Previous Thread: autocomplete textbox
- Next Thread: Problem - Multiple executions of Page_Load on 1st entry


Linear Mode