Is it possible to call back a link from an action of changing your choice in the drop-down list without using JavaScript?
I remember when using the ASP.NET Forms drop-down list of elements there was a property that, when set, causes a postback when changing, did it run without JS? “If so, how?”
Thanks a lot, Cohan.
JavaScript . , . JavaScript (- ), .
, AutoPostBack.
jQuery. JavaScript . ASP.NET JavaScript AutoPostBack.
<script type='text/javascript'\> $('#dropDown').change(function () { $(this).parents('form').submit(); }); </script>
:
asp.net mvc
script,
@Html.DropDownList("Projects", Model.Projects, new { style = "Height: 25px; width: 225px;", onchange = "$(this).parents('form').submit();" })
Source: https://habr.com/ru/post/1781680/More articles:SQL query to remove duplicate rows from one table? - sqlWhat is the C # equivalent for serializing PHP? - c #Предотвращение угона в ZK - javaHow to join subqueries in PL / SQL? - sqlHibernate order for a specific state - hibernateCriteria use an aggregate function in order - javaWCF UserNamePasswordValidator - access credentials after verification - c #using vs functions using templates in xslt? - xsltusing Contact.NICKNAME - javaAndroid: how to import a class that I created? - androidAll Articles