i have a label values like a1,a2,a3
if the fare is 700means,How to calaculate the values
For ex:a1,a2,a3 totally 3Count
any my output sholud be like this 700*3=2100
Hi Vasanth057,
Refer below code
C#
int count = label1.split(',').Length; int total = convert.ToInt32(lblFare.Text) * count; DisplayLabel.Text = total.ToString();
JavaScript
var count = document.getElementById('Your Label Id ').innerHTML.split(',').length; var total = document.getElementById('Your Fare Label Id').innerHTML * count; document.getElementById('Your Display Label Id').innerHTML = total;
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.