Programatically change <div id="someid"> tag in ASP.NET. when runat="server" not available

I'm working with a tab control that's generated from a javascript library. I'm able to assign ids to the various tab panels for example <div id="panel1">, <div id="panel2">.  I'm trying to programmatically assign varying content to the various tab panels using  However, because the panels are dynamically created by the javascript when the page loads, i'm not able to assign the runat='server' attribute in the div tag.  How to i reference these <div> id's in my code?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib KhanSenior DeveloperCommented:
how are you setting up runat attribute in javascript?

var d = document.createElement("div")
d.setAttribute("runat", "server")

did you consider adding server div controls using vb/c# instead?
todd_nakasatoAuthor Commented:
the javascript is generated directly from a extjs panel control.  
Well, of course if something is created on the client, your server-side code can not touch it.

But you have some options:
1. Pass (server-side generated) values of parameters along to the javascript library.
2. Get the desired content of divs through an AJAX call.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Just wondering how you imagine a div that is created on the client to be running on the server?

ASP.Net is even worse than other web languages in that fools developers into thinking that there is no difference between client-side script and server-side script. So maybe you are forgiven.

But you should really understand that once the HTML has been sent to the browser, the server has no longer any control about what happens. From that moment it is the browser that takes control about what happens.
You might have included some javascripts in the HTML, but there is no guarantee that the browser will execute that javascript.
Use the AJAX tab container from the Microsoft library.  You can interact with its properties in the code behind, set the contents of its panels, change the tab text, etc.

I use this heavily in several applications and it works like a champ.
todd_nakasatoAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.