?
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
Medium Priority
?
389 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
3 Comments
 
LVL 6

Accepted Solution

by:
Webmonkey earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month17 days, 10 hours left to enroll

830 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