locked
user control RRS feed

  • Question

  • User467762409 posted

    i have 2 pages in my asp project: page #1 is an input for the user that needs to fill all the parameters for the user control, for exemple if the user write something in the title text box-i have to build a user control with this title, if he added a uri for image at the image text box i need to include this image in the user control that i have to build for him. and page #2 will show me the user control exactly like the user request.

    how do i do this?

    i build a data base for page #1 that have all the parameters, but now what? how will i build the user control?

    thank you!

    Wednesday, July 20, 2011 4:48 PM

Answers

  • User-1138901951 posted

    Hi,

    Firstly, I assume that you are sending the selected criteria from page#1 to Page#2 (where the UC is) as either query string or post method.

    1. Setup the UC and add all the asp.net or HTML generic controls on the UC make visibility to false.

    2. Collect all information on the second Page

    3. Based on the collected information you can render the asp.net or html genereic control programatically using c# or vb.net.

    4. Make appropriate asp.net control/html genric control's visibility to true


    Note: You can use builder pattern, if you want to have future modification flexible.


    Thanks
    Raj

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 25, 2011 4:18 AM

All replies

  • User-1138901951 posted

    Hi,

    Firstly, I assume that you are sending the selected criteria from page#1 to Page#2 (where the UC is) as either query string or post method.

    1. Setup the UC and add all the asp.net or HTML generic controls on the UC make visibility to false.

    2. Collect all information on the second Page

    3. Based on the collected information you can render the asp.net or html genereic control programatically using c# or vb.net.

    4. Make appropriate asp.net control/html genric control's visibility to true


    Note: You can use builder pattern, if you want to have future modification flexible.


    Thanks
    Raj

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, July 25, 2011 4:18 AM
  • User-1138901951 posted

    Thanks for marking my post as answer. I am happy that my post helped you.

    Regards,

    Thursday, July 28, 2011 12:18 PM