I have 2 , one is created in design time and one is created in runtime. Now i want to get the property value of these
, which is set at the time of creation. E.G.
Like for div 1:
Code
for div 2:
HtmlGenericControl div1=new HtmlGenericControl();
div1.ID="hello";
div1.style.add("left","300px");After creating my
like this, i would like to get the value of left property of both
in runtime using c#.
How can i get it...?
Thanks..

Vishal GilbileRank #269 · 9.4K pointsPosted Apr 8, 2013, 3:13 AM EDT
you can only access server control in your code behind. Therefore you will have to set the attribute runat="Server" on both the div and also provide a unique id through which you can access those div's.
And you can access it like the following