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

Last Reply 7 months ago By AnandM

Posted 7 months ago

Hi,

 
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 
Posted 7 months ago Modified on 7 months ago

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 

https://msdn.microsoft.com/en-us/library/y6wb1a0e.aspx

Hope this help you

 

I agree, here is the link: http://e-iceblue.com/free-api