Asp.Net MVC -How does Javascript pick up a pasted Url and use it to test the Url via a button click

I’m using an Asp.net 6 MVC driven project. People submitting a video to a show are asked to paste the url and then click a button to test that the url works. This is the code that collects the url:

<label class="control-label" style="font-size:12"><strong>Video Link </strong><small> [Paste link to URl, use Test Video Link to test that link works before </small></label>
<input asp-for ="VideoLink1" id="videolink1" type="url" class="form-control" placeholder="Video Link - URL or Vimeo" style="font-size:medium">
<span asp-validation-for="VideoLink1" class="text-danger"></span>

<i class="fa fa-video"></i> <input name="testvideolink" class="btn btn-group-sm btn-info" id="testvideolink" style="font-size:smaller" value="Test Video Link" onclick="ViewURL()">

This is then picked up by script which should open the url in a separate web page:

function ViewURL() {
var url = document.getElementById('videolink1');
window.open(url, "_blank")

The simplest way to deal with this would be send it to the controller and then get the user to click the test button when it returns from the controller but this seems a bit clunky. However, videolink1 does not have the url without running it through the controller. I’ve tried various ways of trying to get the url name from the unsubmitted asp-for but have not found a way.