473,320 Members | 1,612 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,320 software developers and data experts.

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:partnerdownloads id="Partnerdownloads1" PropDomain="<%= Domain %>"
PropPartnerUserGroupID="<%= PartnerUserGroupID %>"
runat="server"></uc1:partnerdownloads>

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 1383
Hi,
Setting properties can be dynamically achieved using the following code..

((WebUserControl1)Partnerdownloads1).PropDomain= "your value";
((WebUserControl1)Partnerdownloads1).PropPartnerUs erGroupID= "your value";

WebUsercontrol1 is the ascx( user control) name..

Hope this would help..

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

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

<uc1:partnerdownloads id="Partnerdownloads1" PropDomain="<%= Domain %>"
PropPartnerUserGroupID="<%= PartnerUserGroupID %>"
runat="server"></uc1:partnerdownloads>

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..

((WebUserControl1)Partnerdownloads1).PropDomain= "your value";
((WebUserControl1)Partnerdownloads1).PropPartnerUs erGroupID= "your value";

WebUsercontrol1 is the ascx( user control) name..

Hope this would help..

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

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

<uc1:partnerdownloads id="Partnerdownloads1" PropDomain="<%= Domain %>"
PropPartnerUserGroupID="<%= PartnerUserGroupID %>"
runat="server"></uc1:partnerdownloads>

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
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...
4
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...
1
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...
3
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...
9
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...
6
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...
1
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...
1
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...
3
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.