views:

1485

answers:

5

Is it possible without encapsulating these controls in aspx files? The Register tag makes me think that it is not.

A: 

No, ASCX are user-controls, that exist on ASPX. You will need to make it a Page, or convert into Handler.

BigBlondeViking
A: 

You can't call ascx page directly, they can't serve any html without added to aspx or render then dynamically in response to any page/handler.

Vipul Limbachiya
A: 

Since I've started using jQuery/Ajax more and more, I find I've been using server controls less and less.

Things that I used to put into controls are now just individual aspx pages which get loaded into panels.

If you have old ASCX files, it shouldn't be too hard to convert them to ASPX

Neil N
right I realized that too ... :)
A: 

No.

That said, you could place your ascx inside an UpdatePanel and set the panel's content visible/invisible using the standard Asp.Net postback mechanisms.

Or you could write a separate IHttpHandler which generates HTML code that your Javascript code adds to the page using DOM. This part of the page would however not be accessible in PostBack.

devio