Introduction
In this blog we will try to learn about URL mappings by using Generic Handlers in ASP.NET.
Handlers will be used to manipulate incoming requests and pass requests from one page to another page.
Typically it maintains all HTTP Module functions.
Conceptual View
Find sample execution for dynamic mapping:
In this mapping we need to give configuration at web.config level. So that your request enables you to transfer.
- <system.web>
- <urlMappings enabled="true">
- <add url="~/Home.aspx" mappedUrl="~/ReqHandler.ashx"/>
- </urlMappings>
- </system.web>
Prepare a solution and give startup page to Home.aspx.
Now your request is transfered to Handler from Home.aspx. Just execute your home page and check it once.