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

User Control: Dynamic Properties!!

Hi all,

I have just tried to assign the properties of a user control dynamically in
the following way:

<% If Not(Request.QueryString("lvl2") Is Nothing) Then %>
<L:Links ID="LevelTwo" intAreaID="<%=Request.QueryString("lvl2")%>"
intStandardID='<%# Container.DataItem("standard_id")%>' Runat="Server"/>
<% ElseIf Not(Request.QueryString("lvl3") Is Nothing) Then %>
<L:Links ID="LevelThree"
intAreaID="<%=Request.QueryString("lvl3")%>" intStandardID='<%#
Container.DataItem("standard_id")%>' Runat="Server"/>
<% End If %>

Obviously this is incorrect.

How would i go about this?

Cheers,
Adam
Nov 25 '05 #1
1 1098
Hi,
I'm sorry but I'm not sure what you're trying to accomplish, maybe you
could explain a little more about what you want to do and what kind of
component L:Links is?

Best regards,
Mats

Adam Knight wrote:
Hi all,

I have just tried to assign the properties of a user control dynamically in
the following way:

<% If Not(Request.QueryString("lvl2") Is Nothing) Then %>
<L:Links ID="LevelTwo" intAreaID="<%=Request.QueryString("lvl2")%>"
intStandardID='<%# Container.DataItem("standard_id")%>' Runat="Server"/>
<% ElseIf Not(Request.QueryString("lvl3") Is Nothing) Then %>
<L:Links ID="LevelThree"
intAreaID="<%=Request.QueryString("lvl3")%>" intStandardID='<%#
Container.DataItem("standard_id")%>' Runat="Server"/>
<% End If %>

Obviously this is incorrect.

How would i go about this?

Cheers,
Adam

Nov 28 '05 #2

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

Similar topics

0
by: billy | last post by:
I'm using vs.net 2005 beta (July distribution). I'm having problems getting my control's properties (i.e property int PropertyTest int get(); set(int)} and what I don't I'm doing anything wrong...
2
by: Russell | last post by:
Morning, I have been having trouble with a my embedded user control not being able to see the view state that I set in its parent page. I have done a test with the following and I still cant...
0
by: Roland Wolters | last post by:
Hi, The HTML code that makes up parts of the webform is specified in a template: <Table> <tr><td>some text here {fieldvalue}</td></tr> </table>
2
by: hansiman | last post by:
I'm puzzled! In a web user control (ascx) I embed some server controls. I drop the web user control onto an aspx page. In the web user control's code behind I would like to manipulate the user...
3
by: Steve Long | last post by:
Hello. Can anyone tell me the proper way to save the properties of a user control between design time and run time? So, I've got this user control with the following properties: BarColor1...
0
by: Eric | last post by:
Hello. Is it possible to make Web User Control displaying all the properties just like built-in controls? Can I make it to be placeable and moveable like f.ex. div or panel? If yes - how? What...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
3
by: HP | last post by:
Hi there I've asked about it few times, and seen it asked more times, but no one ever replied. The question is: is it possible to use a control inside of user control (eg. dropdownlist) as a...
2
by: Max2006 | last post by:
Hi, I have a user control with a public property like this: public string Text { get { return cboCountry.Text; } set { cboCountry.Text = value; } }
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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...

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.