I am generating HTML Element dynamically like below.
$(gameObjectElement).html('<div id="board" runat="server" clientidmode="Static" "></div>');
Now I want to get id of div from code behind. I am writing code like below.
HtmlGenericControl div1 = (HtmlGenericControl)Page.FindControl("board");
div1.Style["background-image"] =Page.ResolveUrl( "../images/Adventure/Puzzles/LImage/" + objGet.LImage);
When i debug the above code, i get the div1 value 'null'. How i will get the div value from code behind using ASP.Net,C#. Please suggest me.