473,666 Members | 2,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web User Controls (Setting properties dynamically)

Hi everyone,

I have the following web user control. I like to set the properties
dynamically without using page.databind.

<uc1:partnerdow nloads id="Partnerdown loads1" PropDomain="<%= Domain %>"
PropPartnerUser GroupID="<%= PartnerUserGrou pID %>"
runat="server"> </uc1:partnerdown loads>

However, and <%= Domain %>
and <%# Domain %>

failed.

I have declared Domain as a public. Could someone please tell me how to
fix this?

Thanks
Maz.

Feb 16 '06 #1
2 1398
Hi,
Setting properties can be dynamically achieved using the following code..

((WebUserContro l1)Partnerdownl oads1).PropDoma in= "your value";
((WebUserContro l1)Partnerdownl oads1).PropPart nerUserGroupID= "your value";

WebUsercontrol1 is the ascx( user control) name..

Hope this would help..

-Baskar-
"ma*******@gmai l.com" wrote:
Hi everyone,

I have the following web user control. I like to set the properties
dynamically without using page.databind.

<uc1:partnerdow nloads id="Partnerdown loads1" PropDomain="<%= Domain %>"
PropPartnerUser GroupID="<%= PartnerUserGrou pID %>"
runat="server"> </uc1:partnerdown loads>

However, and <%= Domain %>
and <%# Domain %>

failed.

I have declared Domain as a public. Could someone please tell me how to
fix this?

Thanks
Maz.

Feb 17 '06 #2
Hi BASKAR BV is there any way to write the property of the ascx and change it
from the properties windows (Designer view) ????????

"BASKAR BV" wrote:
Hi,
Setting properties can be dynamically achieved using the following code..

((WebUserContro l1)Partnerdownl oads1).PropDoma in= "your value";
((WebUserContro l1)Partnerdownl oads1).PropPart nerUserGroupID= "your value";

WebUsercontrol1 is the ascx( user control) name..

Hope this would help..

-Baskar-
"ma*******@gmai l.com" wrote:
Hi everyone,

I have the following web user control. I like to set the properties
dynamically without using page.databind.

<uc1:partnerdow nloads id="Partnerdown loads1" PropDomain="<%= Domain %>"
PropPartnerUser GroupID="<%= PartnerUserGrou pID %>"
runat="server"> </uc1:partnerdown loads>

However, and <%= Domain %>
and <%# Domain %>

failed.

I have declared Domain as a public. Could someone please tell me how to
fix this?

Thanks
Maz.

Feb 20 '06 #3

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

Similar topics

6
2566
by: Earl Teigrob | last post by:
I am writing an application that dynamically loads user controls at run time based on user options. I would like to give my users the ability to build their own user controls and add them to my user control folder so that they can be selected and loaded at run time also. These new controls will need to have access to many of the classes with there properties and methods within the complied code. Is this possible? This seems to be the...
4
2439
by: Josh Harris | last post by:
Here is my question: It is common to have many pieces of business logic encapsulated within asp.net user controls. This can be found in high visibility projects such as the iBuySpy portal from MS. Virtually every bit of the site is encapsulated within user controls. The problem begins when you try to have user controls pass information to one another as well as to their parent form. This can be accomplished by creating public...
1
13688
by: Josh | last post by:
Hi Guys, I have been having a big problem with trying to pass parameters into a user control when the user control is dynamically loaded into a placholder. I am developing in c#. I have get and set methods on the user control "editButton.ascx" which work fine. How do i pass parameter into the user controls "c1", "c2" ? Here is a bit of my code that is calling the user control from the
3
2535
by: Dotnet Gruven | last post by:
I've built a WebForm with a Table added dynamically in Page_Load when IsPostBack is false. The table includes a couple of TextBoxes, RadioButtonLists and CheckboxLists. On postback, those controls are not present nor their valves in Request.Form.AllKeys.
9
3184
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.).
6
11068
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to how those properties are set. I want to be able to do two other things: a) add User control instances to my page, filling in the place of placeholder controls, and b) programmatically setting custom properties on those dynamically spawned...
1
2308
by: zb | last post by:
Here is the page architecture: Page loads multiple user controls (including nested user controls) dynamically based on parameters provided into place holders. Note: The page only has the logic to load the user controls and subscribe to custom event exposed in the user controls. Scenario: User comes to this page fills the fields generated by multiple user controls and then hits "Save" button in one of the forms.
1
4742
by: zeya_bakhtyar | last post by:
Here is the page architecture: Page loads multiple user controls (including nested user controls) dynamically based on parameters provided into place holders. Note: The page only has the logic to load the user controls and subscribe to custom event exposed in the user controls. Scenario: User comes to this page fills the fields generated by multiple user controls and then hits "Save" button in one of the forms.
3
1925
by: Fred Chateau | last post by:
I am trying to access a user control class, for a user control that is loaded dynamically, from the containing page. I have been able to access Web controls in the user control, but so far I have been unable to expose the user control class itself. I'm guessing that I need to set up an interface, but I am not sure how to accomplish this. Here is the code that loads the user control: protected void Page_Init(object sender, EventArgs e)...
0
8454
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8883
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8787
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8645
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6203
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1778
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.