PRN221_-_FE_-_SU_2023_506.webp
K

PRN221_-_FE_-_SU_2023_506.webp

Answer (Choose 1 answer)

Model Binding in Razor Pages is the process that takes values from HTTP requests and n handler method parameters. Choose the correct way to bind the posted form values to ha parameters.
A. public class ModelBindingDemo: PageModel
{
public void OnGet()
public void OnPost(string name, string email)
{ } ViewData["confirmation"] = $"{name}, information will be sent to (email}";
}
B. public class ModelBindingDemo: PageModel
{
[BindProperty]
public string Name { get; set; }
BindProperty][
public string Email { get; set; }
public void OnGet()
public void OnPost()
{ } ViewData["confirmation"] = $"{Name}, information will be sent to {Email}";
}
C. [BindProperties]
public class Model Binding Demo: PageModel
[BindProperty]public string Name { get; set; }
[BindProperty]
public string Email { get; set; }
public void OnGet()
public void OnPost()
ViewDatal"confirmation"] = "(Name) information will be sent to (Email)"-
Exit 32

Thông tin

Category
PRN221
Thêm bởi
Kokichi20051
Ngày thêm
Lượt xem
1,160
Lượt bình luận
3
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRN221_-_FE_-_SU_2023_506.webp
File size
88.3 KB
Dimensions
1926px x 906px

Share this media

Back
Bên trên Bottom