C# asp菜单项NavigateUrl的正确语法
在代码隐藏中:C# asp菜单项NavigateUrl的正确语法,c#,asp.net,C#,Asp.net,在代码隐藏中: MenuItem.NavigateUrl = string.Format("~/LecturerProfile.aspx?user={0}", id); 现在我想在aspx页面中导航到另一个页面,而不是在代码隐藏中 就像: <asp:MenuItem NavigateUrl="./LecturerProfile.aspx?user={0},id" Text=" Lectureprofile"/>// it seems to be wrong??? //好像是错了?
MenuItem.NavigateUrl = string.Format("~/LecturerProfile.aspx?user={0}", id);
现在我想在aspx页面中导航到另一个页面,而不是在代码隐藏中
就像:
<asp:MenuItem NavigateUrl="./LecturerProfile.aspx?user={0},id" Text=" Lectureprofile"/>// it seems to be wrong???
//好像是错了???
我不知道MenuItem NavigateUrl的正确语法,帮助
id
值来自哪里?
<asp:menuitem navigateurl="<%= string.Format("~/LecturerProfile.aspx?user={0}", id) %>"
text="Lectureprofile"
tooltip="Lectureprofile">