Professional Web Applications Themes

Generate dynamic controls from Database tables - ASP.NET Building Controls

Hi, I'm trying to generate controls like textboxes, drop downs dynamically. I need to get their type and the values from the DB. Any suggestions on how to generate them? Thanks Adi...

  1. #1

    Default Generate dynamic controls from Database tables

    Hi,
    I'm trying to generate controls like textboxes, drop downs
    dynamically. I need to get their type and the values from the DB. Any
    suggestions on how to generate them?
    Thanks
    Adi
    Adi Guest

  2. #2

    Default Re: Generate dynamic controls from Database tables

    Adi Hi,
    Hi,

    I think that the easiest way to do it is to build factory class that
    receive control type and assembly name (for controls that doesn't ship
    with VS) as string parameter and return instance of that control.

    you can save control type and assembly name (for controls that don't
    ship with VS) in DB. Get that data from your DB on page load, send that
    data to your factory and use Controls collection to add the new control
    into your page.

    HTH


    Natty Gur[MVP]

    blog : [url]http://weblogs.asp.net/ngur[/url]
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

Similar Threads

  1. Automatically generate formatted tables InDesign
    By 2Workman@adobeforums.com in forum Adobe Indesign Windows
    Replies: 5
    Last Post: April 16th, 07:36 AM
  2. Auto Generate Dynamic Links In PDF
    By Brian_Oakes@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 1
    Last Post: April 5th, 02:24 PM
  3. generate tables that include hyperlinks
    By bender in forum ASP Database
    Replies: 1
    Last Post: February 15th, 09:00 PM
  4. Controls in tables
    By Perecli Manole in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: October 3rd, 11:45 PM
  5. Nesting server controls with a composite control don't generate postback events
    By Stephen Miller in forum ASP.NET Building Controls
    Replies: 8
    Last Post: August 6th, 03:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139