Custom web controls

G

Guest

What do you mean by dynamic controls? Do you mean that you can instantiate
and add them to the page on the fly during a postback? If so, then develop
the control and then to dynamically add it to the page use Page.Controls.Add
method.

Or, are you talking about creating a control that allows databinding?

Please clarify.
 
S

Smokey Grindle

Controls that I can change the content at runtime... like say I want to talk
to a database, get a list of items, then come back and custom render the
HTML the control will display... what I'm looking for is what is the best
way to do that in .NET 2.0... in .NET1.1 we did this through a "custom web
control" which I dont seem to see in .NET 2.0 anymore
 
G

Guest

I'm a bit confused by your statment that you did it through a "custom web
control" that you no longer see in 2.0. Which control? (there is no control
called "custom web control").

Secondly it sounds like you just need a user control that has a method which
takes a string as an argument. Pass it the html markup you want.

The user control uses a Literal to render the markup, the method assigns the
Text property of the literal with the html markup.

This way the user control will render any markup you send it.

Is this what you're talking about doing?
 
S

Smokey Grindle

no it is not..

In .NET 1.1 there were custom web controls and custom web control librarie
projects... in these you could do all kinds of dynamic stuff... and packadge
them as a redistributable dll or just use them in your site like a custom
control. In .NET 2.0 the web control library seems to be gone, along with
the custom control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top