Dynamically changing server control defaults

Discussion in 'ASP .Net' started by Guest, Mar 3, 2004.

  1. Guest

    Guest Guest

    We are building a web application that allow's the users to change the defaults of a their pages.
    Here is a list of what I've done so far
    1.) Return the control names, control properties and default values back from a database
    2.) I load each record into an objec
    3.) I then load all of these objects into a collection and send it back to the page.
    This all works great but then my problem starts
    Here is where I am stuck
    Dim cn As Strin
    Dim cp As Strin
    Dim cdv As Strin
    For Each obj In collControls 'This is my collection that was sent bac
    Dim cntl As D_Controls = New D_Controls 'This is my objec
    cntl = ob
    cn = cntl.ControlName 'example: "Button1
    cp = cntl.PropertyType 'example: "Text
    cdv = cntl.DefaultValue 'example: "Hello

    ' This is ultimately what I want to do. This is where the question lies.
    ' I know that the following doesn't work
    cn.cp = cdv ' example: Button1.Text = "Hello
    Loo

    Anyone have any ideas. All I want to do is reset the page's default

    Thanks
    Scot
     
    Guest, Mar 3, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.