Ouch... That's some slow and repetetive code... (Excuse me for being blunt...)
You could read all the data that you need into a DataTable (using a DataSet and a SqlDataAdapter) so that you can reuse it and don't have to run a query for every level and every item in the menu. That way you can have a single database call instead of a whole lot of them, and the database calls is absolutely the bottle neck in this code.
You could use recursion to get different levels, instead of repeating the same code over and over again.
To build the elements for the menu you have several options. One is to put a PlaceHolder in the page and create a tree of controls by adding them to each others Controls collection. Another option is to simply build the HTML code yourself in a StringBuilder, and put the result in a Literal control.