By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,312 Members | 1,341 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,312 IT Pros & Developers. It's quick & easy.

Custom controls

P: n/a
I have a piece of functionallity that is replicated on several pages. This
would be a good candidate for a custom control right?

Well I found a couple of tutorials (none really helpful) so I created a
simple asp app and added a custom control to the project.

Now to the problem. I created the control using a GridFlow control so that
the position of the controls within the custom control can be formatted
correctly. I then added the control to the asp page. The problem is that I
cannot figure out how to control where the output is shown. On the design
page the custom control shows at the left/top corner. By adding the style
attributes style="LEFT: 41px; POSITION: absolute; TOP: 32px" I can make the
controls show correctly on the design page but running the page destroys the
position.

Please help or direct me to an info source that leads me through the process
of creating the controls.
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
PS, when I add these controls there does not seem to be any way to see these
controls in code. I cannot make them "Run as Server", and they do not show
in the VB code.

Placing the cursor on any other control will cause the properties window to
show the control selected. This is not the case for the simple custom
control I created. It was created in the project and the ascx file in the
Project Explorer then dragged to a position.
"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in message
news:7R******************@news01.bloor.is.net.cabl e.rogers.com...
I have a piece of functionallity that is replicated on several pages. This would be a good candidate for a custom control right?

Well I found a couple of tutorials (none really helpful) so I created a
simple asp app and added a custom control to the project.

Now to the problem. I created the control using a GridFlow control so that the position of the controls within the custom control can be formatted
correctly. I then added the control to the asp page. The problem is that I cannot figure out how to control where the output is shown. On the design
page the custom control shows at the left/top corner. By adding the style
attributes style="LEFT: 41px; POSITION: absolute; TOP: 32px" I can make the controls show correctly on the design page but running the page destroys the position.

Please help or direct me to an info source that leads me through the process of creating the controls.

Nov 18 '05 #2

P: n/a
PS again.

In just trying anything to get this to work I notice the following:

- I can add attributes manually in design to get the control to show in the
correct place in the design page.
- As soon as I do this the designer looses its mind. The dropdown list of
controls will only show one control. I have added labels and other things
to see what is generated but only one of these controls will show in the
dropdown list.

This makes no sense other than the parsing of the page that takes place
between the design and HTML views fails with no indication to the developer.
Nov 18 '05 #3

P: n/a
Another thing that is wrong is that the control is not added to the code of
the hosting page (code behind). I have a feeling that what I am doing is
very wrong. I have followed a tutorial and while the control will show in
the page, I cannot make it so that it will show in the correct place and
cannot be referenced by anything else on the page.
"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in message
news:7R******************@news01.bloor.is.net.cabl e.rogers.com...
I have a piece of functionallity that is replicated on several pages. This would be a good candidate for a custom control right?

Well I found a couple of tutorials (none really helpful) so I created a
simple asp app and added a custom control to the project.

Now to the problem. I created the control using a GridFlow control so that the position of the controls within the custom control can be formatted
correctly. I then added the control to the asp page. The problem is that I cannot figure out how to control where the output is shown. On the design
page the custom control shows at the left/top corner. By adding the style
attributes style="LEFT: 41px; POSITION: absolute; TOP: 32px" I can make the controls show correctly on the design page but running the page destroys the position.

Please help or direct me to an info source that leads me through the process of creating the controls.

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.