473,386 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HttpHandler - Passing a parameter

Hello,

I created an HttpHandler class, compiled it and tested it. It works
fine.
I added an HttpHandler in my web.config file as follows:

<httpHandlers>
<add verb = "*" path="MyHandler" type="MyNM.SiteMap, MyNM" />
</httpHandlers>

However, I now need to pass a parameter to my handler. I tried the
following:
<httpHandlers>
<add verb = "*" path="MyHandler?Id=1" type="MyNM.SiteMap, MyNM" />
</httpHandlers>

I am getting the 404 error. Page Not Found.

If this is not possible, how can I pass parameters to an HttpHandler?

Thanks,
Miguel

Oct 17 '06 #1
1 3868
<httpHandlers>
<add verb = "*" path="MyHandler.adx" type="MyNM.SiteMap, MyNM" />
</httpHandlers>
then when you hit myhandler.adx you can pass any parameters you want:

<img src="myhandler.adx?imageId=3">

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"shapper" <md*****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hello,

I created an HttpHandler class, compiled it and tested it. It works
fine.
I added an HttpHandler in my web.config file as follows:

<httpHandlers>
<add verb = "*" path="MyHandler" type="MyNM.SiteMap, MyNM" />
</httpHandlers>

However, I now need to pass a parameter to my handler. I tried the
following:
<httpHandlers>
<add verb = "*" path="MyHandler?Id=1" type="MyNM.SiteMap, MyNM" />
</httpHandlers>

I am getting the 404 error. Page Not Found.

If this is not possible, how can I pass parameters to an HttpHandler?

Thanks,
Miguel

Oct 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: David Bowey | last post by:
Hi There! I'm writing a custom HttpHandler to create watermarks on my PNG images of my website. So typically, a PNG image is linked in an ASPX page as follows... <img src="images/test.png"...
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
3
by: Liming | last post by:
Hi, I have a HttpHandler (Thumbnail.axd) that output Thumbnail images). The problem is that all the output images being gerneated in the browser all takes the same name "Thumbnail.axd.gif" ...
2
by: deepak.bhardwaj | last post by:
Hi, I have implemented the IHttpHandler interface for generating images and writing them to response stream in binary format. I use an IHttpHandlerFactory to instantiate that handler. A .aspx...
0
by: superman | last post by:
Hi, I have implemented the IHttpHandler interface for generating images and writing them to response stream in binary format. I use an IHttpHandlerFactory to instantiate that handler. A .aspx...
0
by: uraanu | last post by:
I am having an issue with sessions and httphandlers. I have some tracking information that I am passing in my url as folders (ie: www.mysite.com/info1/44/info2/55/mypage.aspx) which I am capturing...
3
by: Tomasz J | last post by:
Hello Developers, I have a following problem: I need to write a HttpHandler rewriting requests like: /Resource.axd?resid=1 to /someimage.gif My HttpHandler is listed in the web.config, its...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.