From 17d787a49ab3c6ae3d896d3c02b50bb99103afd2 Mon Sep 17 00:00:00 2001 From: Dmitriy yawaflua Andreev Date: Mon, 8 Jul 2024 02:45:15 +0300 Subject: [PATCH] Try to add meta-tag whilst using asp mvc --- MVC/Pay.cshtml | 3 +++ MVC/Pay.cshtml.cs | 14 ++++++++++++++ MVC/_Layout.cshtml | 19 +++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 MVC/Pay.cshtml create mode 100644 MVC/Pay.cshtml.cs create mode 100644 MVC/_Layout.cshtml diff --git a/MVC/Pay.cshtml b/MVC/Pay.cshtml new file mode 100644 index 0000000..494a39b --- /dev/null +++ b/MVC/Pay.cshtml @@ -0,0 +1,3 @@ +@page "{username}" +@model OembedTests.MVC.PayModel +

@Model.username

diff --git a/MVC/Pay.cshtml.cs b/MVC/Pay.cshtml.cs new file mode 100644 index 0000000..bcadd28 --- /dev/null +++ b/MVC/Pay.cshtml.cs @@ -0,0 +1,14 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace OembedTests.MVC +{ + public class PayModel : PageModel + { + public string username { get; set; } + public void OnGet(string username) + { + this.username = username; + } + } +} diff --git a/MVC/_Layout.cshtml b/MVC/_Layout.cshtml new file mode 100644 index 0000000..393855a --- /dev/null +++ b/MVC/_Layout.cshtml @@ -0,0 +1,19 @@ + + + + + + @ViewBag.Title + @{ + string oembedUrl = "https://" + Context.Request.Host.Host + "/oembed"; + } + + + +
+ @RenderBody() +
+ +