mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 16:03:11 +02:00
Merge branch 'main' of https://gitlab-stud.elka.pw.edu.pl/egui22l/Krzysztof_Stefan_Rudnicki/egui_lab1_krzysztof_rudnicki into main
This commit is contained in:
commit
3d5ab8a2d1
@ -1,10 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Text.Encodings.Web;
|
||||
|
||||
namespace lab2.Controllers
|
||||
namespace FormEncode.Controllers
|
||||
{
|
||||
public class RegisterController : Controller
|
||||
{
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[ActionName("Complex")]
|
||||
public IActionResult PostComplex(string id, string blogid, string blogTitle, string mail, string password)
|
||||
{
|
||||
if(id != null && blogid != null && blogTitle != null && mail != null & password != null)
|
||||
{
|
||||
// Convert any HTML markup in the status text.
|
||||
id = HttpUtility.HtmlEncode(id);
|
||||
blogid = HttpUtility.HtmlEncode(blogid);
|
||||
blogTitle = HttpUtility.HtmlEncode(blogTitle);
|
||||
mail = HttpUtility.HtmlEncode(mail);
|
||||
password = HttpUtility.HtmlEncode(password);
|
||||
ViewData["userid"] = "userid: " + id;
|
||||
ViewData["email"] = "email: " + mail;
|
||||
ViewData["password"] = "password: " + password;
|
||||
ViewData["blogid"] = "blogid: " + blogid;
|
||||
ViewData["blogtitle"] = "blogtitle: " + blogTitle;
|
||||
return View();
|
||||
}
|
||||
else return View();
|
||||
}
|
||||
//
|
||||
// GET: /Register/
|
||||
|
||||
@ -16,12 +44,13 @@ namespace lab2.Controllers
|
||||
//
|
||||
// GET: /Register/RegisterUser/?userid=Rick&email=4&password=test&blogid=blogtest
|
||||
|
||||
public IActionResult RegisterUser(string userid, string email, string password, string blogid)
|
||||
public IActionResult RegisterUser(string userid, string email, string password, string blogid, string blogtitle)
|
||||
{
|
||||
ViewData["userid"] = "userid: " + userid;
|
||||
ViewData["email"] = "email: " + email;
|
||||
ViewData["password"] = "password: " + password;
|
||||
ViewData["blogid"] = "blogid: " + blogid;
|
||||
ViewData["blogtitle"] = "blogtitle: " + blogtitle;
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,41 @@
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
|
||||
<h2>Register</h2>
|
||||
<h1>Register</h1>
|
||||
<form id="form1" method="post" action="Register/PostComplex"
|
||||
enctype="application/x-www-form-urlencoded">
|
||||
<div>
|
||||
<label for="ID">ID</label>
|
||||
</div>
|
||||
<div>
|
||||
<input name="ID" type="ID" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="BlogID">BlogID</label>
|
||||
</div>
|
||||
<div>
|
||||
<input name="BlogID" type="BlogID" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="BlogTitle">Blog Title</label>
|
||||
</div>
|
||||
<div>
|
||||
<input name="BlogTitle" type="BlogTitle" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="Mail">Mail</label>
|
||||
</div>
|
||||
<div>
|
||||
<input name="Mail" type="Mail" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="Password">Password</label>
|
||||
</div>
|
||||
<div>
|
||||
<input name="Password" type="Password" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="Register" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p>Hello from our Register Template!</p>
|
||||
|
||||
@ -9,4 +9,5 @@
|
||||
<li>@ViewData["email"]</li>
|
||||
<li>@ViewData["password"]</li>
|
||||
<li>@ViewData["blogid"]</li>
|
||||
<li>@ViewData["blogtitle"]</li>
|
||||
</ul>
|
||||
@ -23,7 +23,10 @@
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Register" asp-action="">Register</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Login" asp-action="">Login</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1,6 +1,10 @@
|
||||
{
|
||||
"version": 2,
|
||||
<<<<<<< HEAD
|
||||
"dgSpecHash": "StssT/2eZLkZSn43umSvmeLqenA26xinbyjBVo37pXT5odwyaKlONMyTwzs+CIv5osa4zCXrkySnq/7gxXyTGQ==",
|
||||
=======
|
||||
"dgSpecHash": "eyEvKzMudpqP82Z+w6bg2nOaLduaGey2m4CAR19Eah9o8DIOSuc+ucHN9H/hvyyzQRWe2p/O2oPHE4qMnzW5+Q==",
|
||||
>>>>>>> 2e2c6d050a14788bde6baaa8e0f26cbba66781fb
|
||||
"success": true,
|
||||
"projectFilePath": "/home/kuchy/Zlew/Studia/NieNotatki/Projekty/nie_inzynierka/Programowanie/egui_lab1_krzysztof_rudnicki/lab2/lab2/lab2.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@ -32,3 +32,10 @@
|
||||
2.0
|
||||
2.0
|
||||
2.0
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
2.0
|
||||
2.0
|
||||
2.0
|
||||
2.0
|
||||
>>>>>>> 2e2c6d050a14788bde6baaa8e0f26cbba66781fb
|
||||
|
||||
Loading…
Reference in New Issue
Block a user