Accessing HTML HiddenField value from ASP.Net MVC partial view in jQuery

Samedha
 
on May 02, 2022 08:42 AM
964 Views

I have function which returns partial view data as html

<input type="hidden" id="message" value="Hello" />
    <div id="notifyRelease-modal">
        <div class="container">
            <div class="card">
                <h5 class="card-header">
                <div>Title &nbsp; @Model.Version</div>
                <div class="date">
                    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;22 May 2022)
                </div>
    </div>
</div>

I want to access the hidden field value inside function and give alert.

Data returns following html

$.get("@Url.Action("NotifyNewRelease", "Support")",
function (data) {
    $('.modal-body').html(data); 
});

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
arjunv
 
on May 02, 2022 08:42 AM