Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Get information from ASP .NET div/Panel control and have it sent back to the form without losing form information and updating the form.

Posted on 2011-03-11
4
345 Views
Last Modified: 2012-05-11
So here is what I am doing...  

1) It is a calculator and let's say that there are a total of 10 text boxes on the main form.
2) Based on your company type, selected by a check-box, a Panel pops up with certain form elements that perform a calculation and then send the computation back to the first form element (text box) as the first form element, depending on the type of business you are, is computed differently so will have a different number for the overall calculator based on the calculations for the selected business type.
3) Once the calculation for the text-box is completed and the first text-box is populated, the Panel will/should disappear so that can occur again if necessary for other text-boxes.

I would like to understand the process first along with maybe some concept way/ways to handle this (obviously different ways to do it).

The more specific the better and I'm DEFINITELY willing to share my simple code.

The issue is that I code in PHP, C, and many other languages but it's been a while since I developed and now I am, somehow, the defacto developer here at my company so I'm trying to learn C# VERY quickly... If anyone has any suggestions with that, TOO, that would be AMAZING!!!

Thank you SO MUCH!!!!!!!!
0
Comment
Question by:urbnmediadotcom
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
Webmonkey earned 500 total points
ID: 35120034
Based on my understanding of your description, I think you should follow these steps:

1) It is a calculator and let's say that there are a total of 10 text boxes on the main form.

Ok...

2) Based on your company type, selected by a check-box, a Panel pops up with certain form elements that perform a calculation and then send the computation back to the first form element (text box) as the first form element, depending on the type of business you are, is computed differently so will have a different number for the overall calculator based on the calculations for the selected business type.

To do this, add a HiddenField to your panel.  When the panel is opened, write the name of the textbox (to which the calculation value should be returned) into the HiddenField.  When the button on the panel submits the page:
1. Write the calculation value to the approriate textbox
Page.FindControlById[HiddenField1.Text].Text = intCalculation // where intCalculation is the appropriate value

3) Once the calculation for the text-box is completed and the first text-box is populated, the Panel will/should disappear so that can occur again if necessary for other text-boxes.

Panel1.Visible = false;  
0
 
LVL 6

Expert Comment

by:Webmonkey
ID: 35156516
Bump
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 35944482
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question