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.

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

<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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.