Q:

How to Retrieve Page Hyperlinks after Requesting a URL using MVC3?

I have created a very simple view in my MVC3 project that contains a textbox that receives and validates a URL.  The controller class is rather simple:
 [HttpPost]
    public ActionResult Save(ValidationModel model)
    {
        if (ModelState.IsValid)
        {
            //Save or whatever 
        }
        return View(model);

    } 

I'm needing some guidance on how to retrieve the URL entered into the textbox, and subseuquently scan the resulting page for hyperlinks or  tags.  Once those tags are scanned, I need to return a new view to my user with a list or grid of the tags in alpha order.  
Can anyone point me in the correct direction on above steps?
Thanks:)

A:

In your view model you will have a property:
public class ValidationModel 
{
    [Required]
    public string Url { get; set; }
}

and then you will have a corresponding textbox in the view:
@model ValidationModel 
@using (Html.BeginForm)
{
    @Html.EditorFor(x => x.Url)
    <button type="submit">OK</submit>
}

and finally in your POST controller action:
[HttpPost]
public ActionResult Save(ValidationModel model)
{
    if (ModelState.IsValid)
    {
        //Save or whatever 
        // use model.Url here => it will contain the user input
    }
    return View(model);
}

