custom web user control properties not acessable through the designer?

P

PJ6

I'm sure it's some attribute I have to set but I can't find it. I'd like to
be able to have my properties in my custom web user controls show up in the
web forms designer. Is that possible?

Paul
 
K

Karl Seguin

I hope someone will correct me if I'm wrong, but user controls do not have
this type of design time support. In 1.x, this is functionality limited to
custom server controls. Thankfully 2.0 will solve this.

Karl
 
P

PJ6

Thank you. If I follow your article right it looks like custom web controls
must be compiled separately from the main project and added to the toolbox
from a DLL for the properties to show up properly at design time.

Also - maybe this is a dumb question - is there any way to add a click event
to a control that doesn't come with one, such as your image rollover
control?

Thanks for your help,
Paul
 
S

Steve C. Orr [MVP, MCSD]

Yes, custom controls must be compiled into a separate DLL, thereby
increasing their reusability.

I suggest you use the ImageButtonRollover control if you would like a click
event.
For other controls you may have to add your own via client side script.

Here's more info:
http://SteveOrr.net/articles/ClientSideSuite.aspx
 
P

PJ6

Steve, you rock. Those controls are going to save me time both learning and
developing.

Thanks,
Paul
 
P

PJ6

Question about your ConfirmButton control -

When the user refreshes the web page after the control has been used, a
message pops up, "the page cannot de refershed without resending...", and
then no matter what you select (retry or cancel), the ConfirmButton1_Click
event fires again. In most cases I would think this behavior wouldn't be
acceptable for production use. Is there a way to fix it so that doesn't
happen?

Paul
 
S

Steve C. Orr [MVP, MCSD]

You are in the same position with any kind of button control
The real issue is that a post is done when the user clicks a button, and to
refresh that page the post must happen again.
 
P

PJ6

Hmmm. So is it possible to differentiate if the event is firing from a
refresh and not a click?

I noticed that with multiple controls, only the last user event is fired
again on refresh. I tried to "fool" the page by manually raising the event
of another, dummy control, but that didn't work. Is there a way to, after a
control event fires, redirect where the post will happen on a page refresh
without any special user action?

Thanks for all your help,
Paul
 

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
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top