mercredi 5 octobre 2016

c# and HTML. What is this web application doing?

So I have a project for web, we are using Visual studios with a Web Application using ASP.NET with Razor. I have a piece of code (HTML and C#) I just want to know what it is doing and if I am missing a part of it, the goal here is to get information from the user in a dropbox and take it in for later reallocation.

@{
List<SelectListItem> rStatus = new List<SelectListItem>();
rStatus.Add(new SelectListItem
{
    Text = "Never Married",
    Value = "NeverMarried"
});
rStatus.Add(new SelectListItem
{
    Text = "Widowed",
    Value = "Widowed",
});
rStatus.Add(new SelectListItem
{
    Text = "Divorce",
    Value = "Divorce"
});
rStatus.Add(new SelectListItem
{
    Text = "Seperated",
    Value = "Seperated"
});

HTML

        Please enter your current relationshop status: <br />
        <select id="rStatus">
            <option value="Never Married">Never Married</option>
            <option value="Widowed">Widowed</option>
            <option value="Divorce">Divorce</option>
            <option value="Seperated">Seperated </option>
        </select><br/>




Aucun commentaire:

Enregistrer un commentaire