Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I'm using Master page in my asp.net web application.

where i have pages in sub folder.

when i'm trying to link them using anchor tag, then its making a problem...

Menu:

<div id='cssmenu'>
                                <ul>
                                    <li><a href='#'><span>Home</span></a></li>
                                    <li class='has-sub'><a href='#'><span>Master Setup</span></a>
                                        <ul>
                                            <li><a href="../../MasterSetup/DeptList.aspx">Departments</a></li>
                                            <li><a href="../../MasterSetup/RigList.aspx">Rig</a></li>
                                            <li><a href="~/MasterSetup/WellList.aspx">Well</a></li>
                                            <li><a href="Default.aspx">Well</a></li>
                                            
                                        </ul>
                                    </li>
                                <li class='has-sub'><a href='#'><span>Daily Reports</span></a>
                                        <ul>
                                                <li><a href="#">Report Generation</a></li>
                                                <li><a href="#">Report View</a></li>
                                        </ul>
                                    </li>
                                    <li class='has-sub'><a href='#'><span>For Accounts</span></a>
                                        <ul>
                                                <li><a href="#">Report</a></li>
                                        </ul>
                                    </li>

                                    <li class='last has-sub'><a href='#'><span>Eq. Utilization</span></a>
                                        <ul>
                                            <li><a href="#">Details</a></li>
                                           
                                        </ul>
                                    </li>
                                </ul>
                            </div>


can anyone please help me...



thanks
Posted
Updated 15-Jan-20 18:51pm

1 solution

Add runat="server" to your anchor tags, and use app-relative URLs:
C#
<li><a runat="server" href="~/MasterSetup/WellList.aspx">Well</a></li>
 
Share this answer
 
Comments
abdul subhan mohammed 20-Aug-14 12:01pm    
Sorry, dude, its also not working...
Richard Deeming 20-Aug-14 12:03pm    
Define "not working".
abdul subhan mohammed 20-Aug-14 13:33pm    
When i click on the link for the first time, its take to that, but after that.. whole page is getting disabled. n d url suffix '#'
Richard Deeming 20-Aug-14 13:38pm    
Then you must be clicking one of the links which has href="#".

If you're using javascript to show drop-down menus, then you probably have a script error somewhere on the page, or your script file is not being loaded properly.

Either way, it's not related to this question; it sounds more like you're still struggling with your previous question[^].

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900