AllExperts > Experts 
Search      

Active Server Pages Programming (ASP)

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Active Server Pages Programming (ASP) Answers
Question Library

Ask a question about Active Server Pages Programming (ASP)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Jeff Allen
Expertise
I can answer basic to intermediate questions related to Classic ASP.I can answer Intermediate to Advanced questions CSS& HTML, and basic questions about JavaScript and Ajax. I can also answer questions related to web page accessibility under US Section 508.

Experience
I have 8 years experience with HTML. I have been developing in ASP, VBScript and CSS for two years each. I also currently work as web developer.

Organizations
IWA-HWG

Education/Credentials
I have a BA in English with minors in Web Design and Scientific and Technical Writing

 
   

You are here:  Experts > Computing/Technology > Business Software > Active Server Pages Programming (ASP) > formview

Topic: Active Server Pages Programming (ASP)



Expert: Jeff Allen
Date: 12/28/2006
Subject: formview

Question
I have a bunch of labels in a formview and their data comes from an sql datasource.  I want to create, let's say a total of those labels and put it on an inserted label.  What is the easiest way of doing this?

Thanks,
Ryan

Answer
I would think the easiest way of doing this would be to capture the values of the labels you want to total in the .cs file (making sure to convert them from strings to integers) and then add them up and convert the final value from integer to string and display it in the generated label. I'm not certain of this though as I am still fairly new to .NET myself but it does make sense that you would do it this way.

Otherwise, since you're using a form view you might need to do this in the item template where you assign all the values to the labels.

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.