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
337 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP AJAX JSON 2 61
No Data for DropDown List 2 26
Client Validating 2 date fields, required & comparison 1 29
Javascript/JQuery - HtmlEncode (?) Ajax Result 1 42
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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

832 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