473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

adding web controls from C# code

Hi,

I have got the main page of my project which consists of several web
controls. Some of them I add statically (in aspx page), some of them I'd
like to add from C# code.

For example I add one of the we controls:

<%@ Register TagPrefix="euroc" TagName="B2B" Src="WebControl/b2b.ascx" %>

....................

<euroc:B2B ID="B2B1" runat="server"></euroc:B2B>

I would like to add it from code behind C# instead of adding it
non-dynamically.

Best Regards

Dariusz Tomon
Oct 6 '07 #1
2 1130
Hello Dariusz ,

This is a very straight forward task to accomplish with minimal
effort.
Here is a good article that discusses the pros and cons of this and
demonstrates how easy it is!
http://aspalliance.com/565

Good luck!
RA

On Oct 6, 12:27 pm, "Dariusz Tomoń" <d.to...@mazars.plwrote:
Hi,

I have got the main page of my project which consists of several web
controls. Some of them I add statically (in aspx page), some of them I'd
like to add from C# code.

For example I add one of the we controls:

<%@ Register TagPrefix="euroc" TagName="B2B" Src="WebControl/b2b.ascx" %>

...................

<euroc:B2B ID="B2B1" runat="server"></euroc:B2B>

I would like to add it from code behind C# instead of adding it
non-dynamically.

Best Regards

Dariusz Tomon

Oct 6 '07 #2
Hello Ryan,

It is actually straight forward and works perfectly.
Thank you very much.

Best Regards

Dariusz Tomon

Uzytkownik "Ryan Anderson" <bu*****@gmail.comnapisal w wiadomosci
news:11**********************@50g2000hsm.googlegro ups.com...
Hello Dariusz ,

This is a very straight forward task to accomplish with minimal
effort.
Here is a good article that discusses the pros and cons of this and
demonstrates how easy it is!
http://aspalliance.com/565

Good luck!
RA

On Oct 6, 12:27 pm, "Dariusz Tomoń" <d.to...@mazars.plwrote:
Hi,

I have got the main page of my project which consists of several web
controls. Some of them I add statically (in aspx page), some of them I'd
like to add from C# code.

For example I add one of the we controls:

<%@ Register TagPrefix="euroc" TagName="B2B" Src="WebControl/b2b.ascx" %>

...................

<euroc:B2B ID="B2B1" runat="server"></euroc:B2B>

I would like to add it from code behind C# instead of adding it
non-dynamically.

Best Regards

Dariusz Tomon


Oct 6 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Sue | last post by:
On code-behind page: (attributes set programatically for each of these elements) linkbutton added to tablecell textbox added to tablecell tablecells added to tablerow tablerow added to table...
4
by: DotNetJunky | last post by:
I have built a control that runs an on-line help system. Depending on the category you selected via dropdownlist, it goes out and gets the child subcategories, and if there are any, adds a new...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
5
by: Jeremy Ames | last post by:
I have run into a major road block with my page development projects. I am trying to add a literal control to my asp.net page and I got an error stating that the control could not be added because...
0
by: Sileesh | last post by:
Hi I have html table and a Button in an Aspx page. I am adding one row with some textboxes to Html table each time i click on the Button thru Javascript. Now problem is when when i try to...
3
by: Ankit Aneja | last post by:
I have a strange situation and I have no idea how to solve this. Its a Recruitment Search Page,in the Admin Page, for every button click event the Admin Person has to create a checkbox on the users...
3
by: Toe Dipper | last post by:
In short we have a lengthy process when a form is loaded that adds activex controls to our windows form. This process in itself works fine however we would like to push this processing to a thread...
2
by: _MC_ | last post by:
Hi, i want to structure two elements (each conists of 1 Label and 1 Textbox) in an Table. As I use an Content Place Holder, i thought it is possible to add the table via Controls.add(Literal)....
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
7
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I'm adding subheadings to a gridview. Each sub head has a few link buttons. I'm adding the controls in the rowdatabound event code follows: sorry about the length here. I have to be missing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.