Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you render a User control from a ashx or webservice?

Question is it possible to have a .ashx or webservice return a user control rendered? if so how would i do this?

like image 779
BlackTea Avatar asked Oct 14 '09 00:10

BlackTea


People also ask

How user controls can be included or added into ASP NET web pages explain each step briefly?

Adding a User Control to a PageYou add a user control to a page by registering it on the host page. When you register it, you specify the . ascx file that contains the user control, a tag prefix, and a tag name that you will use to declare the user control on the page.

What is Web user control in asp net?

Web user controls are derived from System. Web. UI. UserControl namespace. These controls once created, can be added to the aspx page either at design time or programmatically during run time.

What is user control and custom control in asp net?

UserControl : A control which can reuse the Components in the Applications. The control can be defined in both Xaml and Code-Behind. CustomControl : An UserInterface element that have a distinct behavior which is said as CustomControl.


2 Answers

This post from our beloved Scottgu might help you :)

like image 92
Mathlec Avatar answered Nov 14 '22 23:11

Mathlec


I haven't tried this, but you might be able to do this by calling the RenderControl method.

like image 23
SLaks Avatar answered Nov 14 '22 22:11

SLaks