User control

L

Louis Yeung

Hi,

I created my very first code-behind user control (ascx) and tried to used it
in the aspx within the same project. I have the following questions:

1. Can I select the user control and drag it into the aspx designer view? I
dragged the ascx from the solution explorer view. VS2003 created a design
time item on the top left corner, but I cannot move it to my intended
position? I am confused that the ascx designer view stated doing something
extra if you need to position the user control.

2. If I expose new properties and methods in the user control and uses it in
aspx, does VS2003 know these new properties (i.e. intelligense) and methods?
I am trying to dive into server control.

3. If my solution has multiple projects and my user control is in project A,
then project B in my solution cannot use this user control. Please confirm.

Thanks in advance.
...Louis Yeung
 
L

Louis Yeung

Steve,

I agree with your point. What is the point of using user control if I cannot
even manipulate the user control. All example has the following pattern 1
form including 1 user control instance.

In real life, I have 1 form with std controls, say 1 user control instance
(at specific position) and more std controls. I can understand there is no
design time support. What about runtime?

I try to write a code-behind user control myTextBox, = WebControls.textbox +
"public int myNumber" property. Since myTextBox is inherited from
UserControl, all the textbox property such as style etc is hidden. This is
why I ask the above question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top