Click here to Skip to main content
15,907,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hiii all,
i have a page which i draw all its attributes in the runtime dynamically.
and i want in every div i draw in attribute name, draw beside it adiv to put a textbox in it.
i have created the div , but i can't handle its position ....
C#
HtmlGenericControl NewControl = new HtmlGenericControl("div");
NewControl.ID = "NewControl";
NewControl.InnerHtml = "This is a dynamically created HTML control.";
test2.Controls.Add(NewControl);

So , any help , please......

Thanks
Posted
Updated 27-Sep-11 15:28pm
v2

1 solution

hi,

As your code you've to add your controls to one dynamic table cells in orderlly

like name in table cell 00 and textbox in table cell 01

C#
Divid.innerHtml="<table width="60%" align="center"><tr><td><div id="fgf">this dynamically created html control </div></td><input type="text" id="fdg" /></tr></table>";


By this only you can get correct position in webpage

you can do it in another way also
by setting style property like position:fixied;left:12px;top:30px;

I hope you understood what I said

All the Best
 
Share this answer
 
Comments
moon2011 27-Sep-11 7:46am    
Thanks alot
Muralikrishna8811 27-Sep-11 7:52am    
you are welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900