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
319 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
Comment Utility
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
Comment Utility
Bump
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now