Incorrect query string?

Incorrect query string?


I have a project. It has several items. When I open a particular item from the Item list the query string is as follows:


I have implemented a ItemSearch functionality where I am providing three comboboxes that get populated at runtime.  (http://serverName/myProjectName/SearchItem.aspx?)

When the user clicks the 'Search' button, then I pass on the relevant ItemId to the Item_List.aspx page and redirect my control to that page.

But my query string still shows http://serverName/myProjectName/SearchItem.aspx? where as it should show  http://serverName/myProjectName/Item_List.aspx?ItemId=155, where 155 is the relevant ItemId.

Any hints?

Nikhil Shravage.
Hi Nikhil,

So, if I understood correctly, the pages are working just the url isn't changing.
If the button of type submit that is the normal behavior to avoid the delay of having a client redirect. The page is just redirected on server side.

You can force a client redirect if you change the button type to Ajax.

João Rosado
Hi João,

The solution you provided, works fine!!

Thanks a lot!

Nikhil Shravage.

I am having the same issue, except the field is a textbox where the user can choose a new customer. No submit button is involved. How to reset querystring parameters in this case?