By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,738 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,738 IT Pros & Developers. It's quick & easy.

Dynamic HTML elements

P: n/a
Hi

how do I add HTML elements dynamically to my page? Is there some similar way
like with ASPX controls, or do I have to render them out in a custom
control?

Thanks, Urs
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
could you be more specific? What is it you are trying to load?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Urs Vogel" <uv****@msn.com> wrote in message
news:uP**************@TK2MSFTNGP10.phx.gbl...
Hi

how do I add HTML elements dynamically to my page? Is there some similar
way like with ASPX controls, or do I have to render them out in a custom
control?

Thanks, Urs

Nov 18 '05 #2

P: n/a
Look in System.Web.UI.HtmlControls is probably what you are looking for.
They work just like asp.NET controls.
Nov 18 '05 #3

P: n/a
Curt

I build all pages dynamically, and would like, for instance, put some ASP
radio buttons into a group box. I just learned, that I could use FILEDSET as
a container to hold my radio buttons. This works when createing a static
page, but I don't know how to add HTML controls (NOT ASP controls)
dynamically to my page, or how do wrap the code below into HTML opening and
ending tags like <fieldset>...</fieldset>?

RadioButton rbt as new RadioButton();
rbt.Text = uctl.text;
rbt.ID = "ID1";
rbt.Style.Add("style", "Z-INDEX: 100; POSITION: absolute; LEFT: " +
Str(uctl.location.X * zoom) + "px; TOP: " + Str(iTitleHeight + TopOffset +
uctl.location.Y) + "px");
pnl.Controls.Add(rbt);

Any hints? Thanks. Urs.

"Curt_C [MVP]" <software_AT_darkfalz.com> schrieb im Newsbeitrag
news:e$**************@TK2MSFTNGP11.phx.gbl...
could you be more specific? What is it you are trying to load?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Urs Vogel" <uv****@msn.com> wrote in message
news:uP**************@TK2MSFTNGP10.phx.gbl...
Hi

how do I add HTML elements dynamically to my page? Is there some similar
way like with ASPX controls, or do I have to render them out in a custom
control?

Thanks, Urs


Nov 18 '05 #4

P: n/a
you need a placeholder. If you want to populate the page with somethign from
the code-behind you'll have to put in a placeholder control, or really even
an asp:Label control, and then you can populate it with your html (or
whatever) as you would like from the code-behind....

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Urs Vogel" <uv****@msn.com> wrote in message
news:up**************@TK2MSFTNGP15.phx.gbl...
Curt

I build all pages dynamically, and would like, for instance, put some ASP
radio buttons into a group box. I just learned, that I could use FILEDSET
as a container to hold my radio buttons. This works when createing a
static page, but I don't know how to add HTML controls (NOT ASP controls)
dynamically to my page, or how do wrap the code below into HTML opening
and ending tags like <fieldset>...</fieldset>?

RadioButton rbt as new RadioButton();
rbt.Text = uctl.text;
rbt.ID = "ID1";
rbt.Style.Add("style", "Z-INDEX: 100; POSITION: absolute; LEFT: " +
Str(uctl.location.X * zoom) + "px; TOP: " + Str(iTitleHeight + TopOffset +
uctl.location.Y) + "px");
pnl.Controls.Add(rbt);

Any hints? Thanks. Urs.

"Curt_C [MVP]" <software_AT_darkfalz.com> schrieb im Newsbeitrag
news:e$**************@TK2MSFTNGP11.phx.gbl...
could you be more specific? What is it you are trying to load?
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Urs Vogel" <uv****@msn.com> wrote in message
news:uP**************@TK2MSFTNGP10.phx.gbl...
Hi

how do I add HTML elements dynamically to my page? Is there some similar
way like with ASPX controls, or do I have to render them out in a custom
control?

Thanks, Urs



Nov 18 '05 #5

P: n/a
That's it, thanks.

"Scott Simons" <Scott.Simons.At.MealMagic.Com.Remove.This> schrieb im
Newsbeitrag news:65**********************************@microsof t.com...
Look in System.Web.UI.HtmlControls is probably what you are looking for.
They work just like asp.NET controls.

Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.