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
Printable View
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
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.
HTHCode:Panel pnlDynamic = new Panel();
pnlDynamic.ID = stringName;
// other panel properties set here
placeholderName.Controls.Add(pnlDynamic);
DJ