public IActionResult Test(string something){}
}
is that possible to generate that actions link without parameter?
Url.Action("Test", "Test", new {something = "something"});
if i use that function i get
/test/test/something
but i need
/test/test
is that possible to generate that? i know i can use split and join and anything like that to remove last part from string. i just want to know is there anyway to generate link without parameter?
Yes you can do that if you set a default value in the parameters for "something" .. So make it like that: public IActionResult Test(string something = null){}
thanks i will test it.
Обсуждают сегодня