Custom Control Add Control Dynamically.

G

Guest

Hi
Iam new to MS .Net technology just getting along with it....I created a custom control ,which takes in a query and displays the data in a tabular format....something similar to a datagrid.

Since its a custom Control I drag and drop and use it in my Pages. I overload the render method of my Custom Control and I pass the data that is to be displayed.

Now there is a requisite I have to add a Control ( Say for ex a Dropdown List box)
Could you please suggest me how do I add a Web-Control dynamically from a Custom -Control in to the webform.

And someone could please suggest the difference between
A web ( server Control and a Custom Control).
 
J

John Saunders

Wannabe_Geek said:
Hi
Iam new to MS .Net technology just getting along with it....I created a
custom control ,which takes in a query and displays the data in a tabular
format....something similar to a datagrid.
Since its a custom Control I drag and drop and use it in my Pages. I
overload the render method of my Custom Control and I pass the data that is
to be displayed.
Now there is a requisite I have to add a Control ( Say for ex a Dropdown List box)
Could you please suggest me how do I add a Web-Control dynamically from a
Custom -Control in to the webform.

You may want to take a look at the resources at
ASP.NET Server Controls
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html
/vbconwebformscontrolssg.asp). In particular, you'll be creating a composite
control.

And someone could please suggest the difference between
A web ( server Control and a Custom Control).



Those are really two terms for the same thing, except that a Custom Control
is one that you create - it didn't come with .NET.



The other term which confused me as a newcomer was "user control". That's a
different animal, a greatly-simplified custom control with a large number of
restrictions.



You might also be interested in the following, if you'll be writing a lot of
custom controls:

"Developing Microsoft® ASP.NET Server Controls and Components" from
Microsoft Press, by Nikhil Kothari and Vandana Datye
(http://www.microsoft.com/mspress/books/5728.asp)
 

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,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top