Problem in accessing page from folder [modified]
-
Hi There I have menu tree.I had given path of my web forms in menu tree using naviage url propery.My web forms are present in admin folder. My problem is that when I run the project using following code then my page doesn't get open. Menu Tree Code But when I keep my web forms in root directory and Change the path to NavigateUrl="~//Company.aspx" then it works.Why this is happening Even I tried ~//Admin/CreateUser.aspx but it is also not working. Can anybody tell me what is the reason. (I am running my project web server on net)
Life Is Beautiful
modified on Tuesday, August 11, 2009 2:51 AM
-
Hi There I have menu tree.I had given path of my web forms in menu tree using naviage url propery.My web forms are present in admin folder. My problem is that when I run the project using following code then my page doesn't get open. Menu Tree Code But when I keep my web forms in root directory and Change the path to NavigateUrl="~//Company.aspx" then it works.Why this is happening Even I tried ~//Admin/CreateUser.aspx but it is also not working. Can anybody tell me what is the reason. (I am running my project web server on net)
Life Is Beautiful
modified on Tuesday, August 11, 2009 2:51 AM
try navigateurl like this Replace (~) with (..)
asp:Menu id="Menu1" runat="server" SkinID="Menu">
<asp:MenuItem Text="Admin" Value="Admin">
<asp:MenuItem NavigateUrl="../Admin/Company.aspx" Text="Company Master"
Value="Company Master">
<asp:MenuItem NavigateUrl="../Admin/BranchMaster.aspx" Text="Branch Master"
Value="Branch Master">
<asp:MenuItem NavigateUrl="../Admin/CreateUser.aspx" Text="Create User"
Value="Create User">
<asp:MenuItem NavigateUrl="../Admin/RoleMaster.aspx" Text="Role Master"
Value="Role Master"> -
try navigateurl like this Replace (~) with (..)
asp:Menu id="Menu1" runat="server" SkinID="Menu">
<asp:MenuItem Text="Admin" Value="Admin">
<asp:MenuItem NavigateUrl="../Admin/Company.aspx" Text="Company Master"
Value="Company Master">
<asp:MenuItem NavigateUrl="../Admin/BranchMaster.aspx" Text="Branch Master"
Value="Branch Master">
<asp:MenuItem NavigateUrl="../Admin/CreateUser.aspx" Text="Create User"
Value="Create User">
<asp:MenuItem NavigateUrl="../Admin/RoleMaster.aspx" Text="Role Master"
Value="Role Master"> -
try navigateurl like this Replace (~) with (..)
asp:Menu id="Menu1" runat="server" SkinID="Menu">
<asp:MenuItem Text="Admin" Value="Admin">
<asp:MenuItem NavigateUrl="../Admin/Company.aspx" Text="Company Master"
Value="Company Master">
<asp:MenuItem NavigateUrl="../Admin/BranchMaster.aspx" Text="Branch Master"
Value="Branch Master">
<asp:MenuItem NavigateUrl="../Admin/CreateUser.aspx" Text="Create User"
Value="Create User">
<asp:MenuItem NavigateUrl="../Admin/RoleMaster.aspx" Text="Role Master"
Value="Role Master"> -
~//Admin**/CreateUser.aspx "/" is considered as a escape sequence... so use ~//Admin//**CreateUser.aspx ... hope this will work
Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]
-
~//Admin**/CreateUser.aspx "/" is considered as a escape sequence... so use ~//Admin//**CreateUser.aspx ... hope this will work
Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]
Of course it won't. Since when is "/" the escape sequence of anything? In C# the escape sequence is "\". The problem lies with the layout though. You have to embed menuitems in an Items tag, like this:
<asp:Menu runat="server">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="New Item" Value="New Item">
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Default2.aspx" Text="New Item"
Value="New Item"></asp:MenuItem>
</Items>
</asp:Menu>Also, would really be advisable if you actually CLOSED your menuitem tags. The path is correct as it is.
var question = (_2b || !(_2b));
-
Of course it won't. Since when is "/" the escape sequence of anything? In C# the escape sequence is "\". The problem lies with the layout though. You have to embed menuitems in an Items tag, like this:
<asp:Menu runat="server">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="New Item" Value="New Item">
</asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Default2.aspx" Text="New Item"
Value="New Item"></asp:MenuItem>
</Items>
</asp:Menu>Also, would really be advisable if you actually CLOSED your menuitem tags. The path is correct as it is.
var question = (_2b || !(_2b));
ais07 says: But when I keep my web forms in root directory and Change the path to NavigateUrl="~//Company.aspx" then it works.Why this is happening Even I tried ~//Admin/CreateUser.aspx but it is also not working. there is no error message metioned....
Padmanabhan My Articles: Articles[^] My latest Article: Word Automation[^]