Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm developing one web application in that i have one class file cement_class.cs in that i have done coding of all methods and property another class file in that i have done coding related to database for add/update/delete using store procedure now i have one aspx page and aspx.cs page it is basically related to cement information now i have three text boxes:

1) no of bags of cement
2)rate per bag
3)amount

So if no of bags is x and rate per bag is y so i want to directly print the answer x*y in that text box of amount perhaps using txtchange event....

so what should be the logic??and at which file i have to write this logic??in class file or aspx.cs file??please if possible anyone just give me idea for this...........

thanks...............
Posted
Updated 29-Jul-12 22:01pm
v2

I guess you don't know ASP.NET. This is homework ? You can do a postback, but I'd just do it in javascript, which means it goes in your aspx file.
 
Share this answer
 
what does the aspx page do? does it only show database information?
in that case, why dont you just change your stored procedure to "select x, y, x*y as z" and bind it?

if the user inputs text and you want to evaluate with a postback, you can add code to the "onTextChanged" Event of the TextBox.
if you want to evaluate without a postback, try jQuery or the AJAX-Toolkit: http://www.asp.net/ajaxlibrary/act.ashx[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900