Click here to Skip to main content
11,480,701 members (63,217 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET C#4.0
Hi,
I have problem with the flow of my project please tell me whether it is possible or not,
I have one grid with radio buttons with the budget names.
i have two buttons under it to load the selected budget and another is to take the snapshot.
now problem is my grid views are filling to the next page when i load the budget but i want snapshot of the gridviews on the same page before loading these budget gridviews.
i have done this,
the procedures i have used for filling the grid views i filled in the dataset on snapshot click and exported to pdf. but the calculations done on next page while loading these grid views obviously not accessible to me. i want some solution to acces these calculations from the next page to previous page. please help me.....
Posted 12-Oct-12 5:07am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I believe you have an issue with the way you have structured your pages here. Your pages should only exist to display your information to the user, or collect information from the user. There should never(with few exceptions) be calculations within UI code. Those calculations should be moved either into a domain level class which is where they belong. That way the code becomes reusable and accessible to any page that may require it.

Some may suggest that you should just make the calculation methods public static in the page you need them from, but that is a bad idea, especially when it comes to the maintainability of your application.
  Permalink  
v2
Comments
Nelek at 12-Oct-12 11:00am
   
Nice explanation, +5
Marcus Kramer at 12-Oct-12 11:03am
   
Thanks Nelek

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 294
1 Richard MacCutchan 160
2 OriginalGriff 135
3 CHill60 130
4 CPallini 125
0 Sergey Alexandrovich Kryukov 8,184
1 OriginalGriff 7,586
2 Sascha Lefèvre 3,114
3 Maciej Los 2,491
4 Richard Deeming 2,335


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 12 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100