I have an ASPX page .In the Top i am displaying 5 categories (Ex : Pen,Book,Shoe,Mobile,Mirror) When i click on any of the categories,I want to show the products under that
As Kirtan mentioned, the easiest answer is to use an Update Panel.
If you don't want to go that route, then you can use jQuery to make Ajax calls to an IHttpHandler which returns the data you need to populate the panel you want to update.
The steps would go as follows:
.ashx
" Ajax handler..ashx
" file generate a response in your format of choice. This could be JSON or XML (if you want JavaScript to parse out the response and generate the list), or the HTML content itself to be added to the page.There are a few tutorials online about how to use an IHttpHander. Basically it's a very simple interface that ASP.NET's "Page
" class is derived from. It is much lighter weight than the Page
class so you can get better performance than you would from an UpdatePanel, however, as with most performance boosting techniques, you have slightly more complex code.
Here is a tutorial on how to use an IHttpHandler class.