Is it possible to Redirect to user control in ASP.Net

on Aug 19, 2016 07:14 AM


I want to redirect to a web User Control. (Response.Redirect is not working) is it possible to do it?
How can i do it?
Thanks in advance 
Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Aug 19, 2016 07:23 AM
on Aug 19, 2016 07:27 AM

Hi Thabang,

  1. No, that's not possible. An ASCX control cannot live alone. It should always be hosted in a WebForm (ASPX). And you can only redirect to WebForms or generic handlers. Actually only to generic handlers which are the basic entry points for web requests. The WebForms is just a custom generic handler.
  2. In short .ascx is not page to redirect. Its a user control. If we need to use it,we have to put it on any page and then only it can be visible in the browser. We never use .ascx as stand alone.

For more details regarding User Control Please refer below link

Hope this help you