Results 1 to 2 of 2

Thread: execute a string

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Posts
    232

    execute a string

    I am developing an asp.net application and i need a command which will do what javascript eval does.
    I have a string and i want that string to be the name of a div which i am dynamically creating.
    any ideas would be greatly appreciated.
    Thanks

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: execute a string

    OK if you place a placeholder on your page where the div will be created dynamically. Then use the code below to first create the div (server-side panel control), assign any properties to the panel e.g. ID, width and height etc. and finally add it to the placeholder ControlCollection.

    Code:
    Panel pnlDynamic = new Panel();
    pnlDynamic.ID = stringName;
    // other panel properties set here
    
    placeholderName.Controls.Add(pnlDynamic);
    HTH

    DJ

Posting Permissions

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



Click Here to Expand Forum to Full Width