visual studio 2013 - Change route running -


i've created route: home / paginabase.
route called new page, called paginabase, has similar header , footer index. creates footer menu.
when select item menu, calls me paginabase riding url this: http://www.localhost:58686/home/paginabase/6/3. until then, it's ok. when select item (paginabase still inside), retains same url in call , adds home/paginabase/8/3 again, there non-existent route.
how solve this?

below jquery function.

function montamenuinferior() {      var str = "";     $.ajax({         url: '/home/montamenuinferior',         datatype: "json",         contenttype: "application/json; charset=utf-8",         type: "post",         success: function (data) {              $(data.resultado).each(function () {                  str = str + '<ul class="grid_4">' +                                     '<li>' + this.subcategoria + '</li>';                   $(this.subconsulta).each(function () {                      if (this.id_subcategoria2 != null)                           str = str + '<li><a href="home/paginabase/' + this.id_subcategoria2 + '/3" title="">' + this.subcategoria2 + '</a></li>';                         //str = str + '<li><a href="@url.routeurl(paginabase"',new{ parametro : this.id_subcategoria2, tipo : '3'} + ")">this.subcategoria2 + '</a>'                     else                         str = str + '<li><a href="#' + this.subcategoria2 + '" title="">' + this.subcategoria2 + '</a></li>';                  });                  str = str + '</ul>';                  $('#menufooter').append(str);                  str = "";              });         },         error: function (error) {          }     }); } 

you're using relative urls in links. if you're in /home/paginabase/6/3 (i.e. that's path) , click link home/paginabase/8/3 new path /home/paginabase/6/3/home/paginabase/8/3.

using absolute urls replace path instead of appending it: /home/paginabase/8/3 (notice / in beginning).


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -