473,386 Members | 1,715 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 property

Hello,

I have an user control with any public propertys.

I wand set up propertys directlly in a code behind of a page where he will
be put in, and not directly in the aspx page. How can I refer this us in my
cs page ?

thanks for your help

Steph
Nov 17 '05 #1
2 981
AW
> I have an user control with any public propertys.

I wand set up propertys directlly in a code behind of a page where he will
be put in, and not directly in the aspx page. How can I refer this us in my cs page ?


You just address it like any other control. Example:
myControl1.Text="Hello"

Now, the problem is that if it is a USER control (not a custom control),
Visual Studio.net doesn't add it to the codebehind declarations.

So after the other controls' declarations, add a line like:
Protected myControl1 as myControl
---
To reply, remove a "l" before the @ sign.
Nov 17 '05 #2
Ok, thanks :-)

Steph
"AW" <aw****@fr.xrt.com> a écrit dans le message de news:
uE**************@tk2msftngp13.phx.gbl...
I have an user control with any public propertys.

I wand set up propertys directlly in a code behind of a page where he will be put in, and not directly in the aspx page. How can I refer this us in

my
cs page ?


You just address it like any other control. Example:
myControl1.Text="Hello"

Now, the problem is that if it is a USER control (not a custom control),
Visual Studio.net doesn't add it to the codebehind declarations.

So after the other controls' declarations, add a line like:
Protected myControl1 as myControl
---
To reply, remove a "l" before the @ sign.

Nov 17 '05 #3

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

Similar topics

9
by: Bob Cummings | last post by:
Greetings I have googled this to no avail, maybe someone here can help. I have a user control that has several radio buttons and text boxes. I place 5 of these user controls on a windows form....
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
4
by: Andrea Williams | last post by:
I'm trying to set up a user control and change some values from the aspx page, but I keep running into trouble. What I really would like to do is be able to set a Label.Text in the user control...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
1
by: John Keenan | last post by:
I have a user control with 2 buttons on it & 1 label.... as each button is pressed, they set a member variable within the class and sets the label test. I also have a get/set property for the...
5
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
0
by: Tom | last post by:
I am having a really annoying issue with serialization and a .NET User Control I am writing. For example, let's say I have a couple of classes in my control - first class is like: Public Class...
5
by: c676228 | last post by:
Hi, I guess I am confused. In aspx script, I mean (you won't use Codebehind="enrollinfo.aspx.vb", but mix code with html and code together) You can access user control's property directly. Since I...
3
by: David Davis | last post by:
I cannot get a web user control to validation client-side using a required field validator. It only validates server side. I have a web user control in .net 2.0. I have a single text box on it....
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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:
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...

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.