Click here to Skip to main content
15,559,287 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to access url in my .ashx file and based on that url i have to store value in Database. How can i do so?


Thanks
Posted
Updated 24-Nov-22 1:48am

1 solution

Look for the properties exposed in the context.Response of the handler in ProcessRequest method.

Follow the article below of how to add a querystring to current URL: ASP.NET ASHX Handler Tutorial[^]
This would help you understand how it works and what are the possibilities to work with URL.
 
Share this answer
 
Comments
zan0701 14-Apr-11 1:28am    
I have already tried this but in my case, handler is being called from .ascx file which is being used in multiple .aspx files.
Isn't there any other way?
Sandeep Mewara 14-Apr-11 1:35am    
So you mean you don't have a url in the Request object there?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900