470,849 Members | 1,236 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

Challenging question regarding AJAX Toolkit AutoCompleteExtender and URL rewriting

2
Hi guys,

I'm running into an issue where my AutoCompleteExtender stops working as soon as I make changes to my global.asax file for URL rewriting. I just want to take a URL http://www.sample.com/file1234.aspx and pass it to asp.net engine as http://www.sample.com/parse.aspx?id=1234 which works great. Except some components of AJAX Toolkit stopped working ex. AutoCompleteExtender as soon as I do the URL rewrite.

This is what I have in my global.asax

HttpContext incoming = HttpContext.Current;
string oldPath = incoming.Request.Path.ToLower();
string newPath = string.Empty;

I check the oldPath and parse the information that I need and assign it to newPath and post for processing

incoming.RewritePath(newPath);

As soon as I remove global.asax from the site, my AutoCompleteExtender starts working again. Any idea?

Thank you
Maz
Mar 19 '08 #1
1 1743
maz00
2
BTW, all you have to do to make AutoCompleteExtender stop working is
to add

protected void Application_BeginRequest(object sender, EventArgs e)
{
HttpContext incoming = HttpContext.Current;
string oldPath = incoming.Request.Path;
incoming.RewritePath(oldPath);
}

to Global.asax file. Anyone knows why?

Thx
Mar 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by ack95 | last post: by
4 posts views Thread by Grant Merwitz | last post: by
reply views Thread by =?Utf-8?B?UmFjaGVs?= | last post: by
2 posts views Thread by Lloyd Sheen | last post: by
7 posts views Thread by SV | last post: by
4 posts views Thread by Peter | last post: by
4 posts views Thread by Peter | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.