C
C#16mo ago
2fur

❔ How to create a subpage by code

Hello, sorry for the dumb question, but its my first attempt to create a website. Is it possible to create/generate from template a subpage? I mean if i have e.g. https://mypage.com/home, i would like to create from it e.g. https://mypage.com/home/user1 / https://mypage.com/home/user2 and so on..
3 Replies
Kouhai
Kouhai16mo ago
Yes, assuming your using MVC, you can render a page for user1 and user2 depending on the url
Angius
Angius16mo ago
[HttpGet("[user]")]
public async IActionResult Index(string user)
{
// ...
}
[HttpGet("[user]")]
public async IActionResult Index(string user)
{
// ...
}
Route parameter binding
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
✅ What is a Discriminator?Can someone please expand a bit more on what a Discriminator specifically is? There is some detail i❔ GUI tabs not showingThe gui tabs that i am using (Unity ImGui) aren't showing on the gui when opened.❔ Synchronise an object across two threads?Hello. I have an object that I use to wait listen for a message from a TcpConnection. However, while❔ Ok to reference both a nuget package, and the project source it's built from while I make changes?I'm wondering about the best practice handling a project that I am deploying privately as a nuget pa❔ VS SQL Server Object Explorer Default Click BehaviorIs there an option for changing the on click behavior of items in the SQL Server Object Explorer lik❔ Regex helpI have this regex: ```(?<![\[\]])(?:"&QUOTE&"([^"]*?)"&QUOTE&"|[^",\[\]]+)(?![\[\]])``` And when p❔ E2E Test - Start MVC projectHi, im using a testing tool for E2E testing and wondered how to get a MVC project started so the t❔ implementing licensing system in my appHi guys, I would like to implement some kind of license system to my app written in c#. I've been coI want to connect an esp32 to VS (WPF) C# via BLE, can anyone help? Maybe a tutorial or an example?I want to read some sensors with the ESP32 Dev, this works very well and i can display the data in m✅ ResolvePackageAssets is failing because it can't find the NuGet fallback folderI installed something called Godot portably on a USB which ended up being more invasive than everybo