Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there, am developing an ASP.NET website, and it seems to me that i have a lot of pages to add to my site, about 100pages. I am using a combo box, preloaded with 100 options, each option a user chooses and clicks on 'go', a page has to be open containing only the contents of that user's selection, Is it possible for me to use c-sharp inheritance and polymorphism so that a page is added automatically in my website by just a click event, even after hosting on a web server. I really feel troubled adding these pages manually, help me with any solution you have got.

Thanks
Your faithfully, Martin
Posted

Hey Martin, Polymorphism and inheritance is used at class level i.e, when you want to extract data from the class itself. The scenario which you have presented in your question can be solved with the help of MASTER PAGES in asp.net.

You can display the different content on the same page in the place holder provided by the MASTER PAGES on the basis of the combo selected item.

Thanks

Varun
 
Share this answer
 
Add each page fields ex username & txtusername in database.

When u select a combobox item retrieve fields from database. for this use dictionary or List and then create controls like lblusername and txtusername.

I provide u the logic just search it on google....

I think this may help u....... :)
 
Share this answer
 
In this case pass the user selected value as a query string to the second page and populate the second page according to the query string.So you'll totally have two pages for this functionality. otherwise you can display data in the same page on selected index changed event of dropdown.
 
Share this answer
 

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