Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67497

How to reference an HTML element in ASP.net?

$
0
0

In my cshtml page I have a select element with multiple options. Below it I have a button which needs the value of the selected option. How do I reference the value of the selected option?

<select>
  <option value="1">1</select>
  <option value="2">2</select>
  <option value="3">3</select>
</select>
<input type="button" value="submit" onclick="location.href='@Url.Action("MyAction", "MyController", new { property = (how do i reference our selected option value here?)})'"

Viewing all articles
Browse latest Browse all 67497

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>