I'm working on an ASP.NET web app in VS2010,C#, I want to make something like this page:
http://www.just-eat.co.uk/restaurants-simplyscrumptious/menu
when you click on food categories on left, page jumps to that category without any postback, how can I achieve it?
Just addition to the previous answer @Aristos
If on the same page, just do
If on another page then do
Then define the sections with
<a name="#sectionName"></a>
How to move with out post back
You use the anchor
#
at the end of the same page url following with the name that you with to move.Then inside the page you place an anhro with the name that you wish to jump like
So if you make a link like
http://www.site.com/catalog.aspx#MovePosition
the browser will brink the line with the<a name="MovePosition"></a>
on top.reference: http://www.w3.org/MarkUp/1995-archive/Elements/A.html
categories menu always on the same point
If you also notice the categories on the left are stay on the same position. This can be done by many ways. In this specific page is use a script to change his location. How ever the better is to place the categories inside a div and give on this div this extra style
position:fixed;bottom:0px;
and will stick on the position that you have place it relative to his parent div.There are many ways to keep the category menu stay on the same point. One other can be found here : http://www.dynamicdrive.com/dynamicindex1/staticmenu.htm even so is old code.