User1686398519 posted
Hi Isuru_anu27,
You can use toggle in jquery. Here’s the example.You can refer to it.
<button id="buttontest" type="button" class="btn-primary">show/hide</button>
<div id="test">
@Html.TextBox("abc")
@Html.TextBox("efg")
</div>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.0.js"></script>
<script>
$(document).ready(function () {
$("#buttontest").click(function () {
$("#test").toggle();
});
});
</script>
Here is the result.

Best regards,
Yihui Sun