asp MenuItem NavigateUrl的正确语法

时间:2014-01-04 15:57:04

标签: 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的正确语法,帮助!!!

1 个答案:

答案 0 :(得分:0)

<asp:menuitem navigateurl="<%= string.Format("~/LecturerProfile.aspx?user={0}", id) %>"
              text="Lectureprofile"
              tooltip="Lectureprofile">

检查此MenuItem.NavigateUrl Property