Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

The actual scenario is this. Consider we have different types of loans like home loan, vehicle loan etc. both the loan forms have some common fields and uncommon fields. i want to store these fields in database. then the user choosing upon the the type of loan the specific controls should load from database.

Kindly suggest solution in detail with a sample coding .

Thanks
Posted
Updated 26-May-10 19:48pm
v4
Comments
Sandeep Mewara 26-May-10 12:10pm    
Report? Where from this report came into picture now? You should update the question with full details and what you are trying to do.

vinmca wrote:
I want to load the controls from database

Where did you used this in the rest of your question? Are you saying you want/are saving the User A/B choices in DB?

vinmca wrote:
Kindly suggest a solution

Save the choices in a DB, Session, QueryString, etc. You can use any state management technique that will provide you the controls selected by User A in page 1.
In page 2, get the data of selected controls, create it dynamically and place them. By default, you can put a panel in Page 2, such that you can add controls to that panel.
 
Share this answer
 
v2
Comments
Vinodh.B 26-May-10 11:11am    
Actually i have to develop 2 types of reports . one report contains 10 controls and another report contains 15 controls where only 5 controls of the 2nd report vary . so commonly i put the controls in DB and want to Display the controls based on a particular report.
vinmca wrote:
Actually i have to develop 2 types of reports . one report contains 10 controls and another report contains 15 controls where only 5 controls of the 2nd report vary . so commonly i put the controls in DB and want to Display the controls based on a particular report.


Based on this, you have the controls saved in DB. You simple need to fetch the list and dynamically create those controls in Page load to display them.

So lets say, you have for Report A: 2 textboxes, 1 dropdown & 1 button saved in DB.
In page load, get this info, and you can have a switch case in place. based on the control type and count, create that control - count number of times.
 
Share this answer
 
Comments
Vinodh.B 27-May-10 1:50am    
hi
Thanks for spending time on my question. i had updated my requirement. kindly go through and suggest a solution

Thanks

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900