Tuesday, August 23, 2011

How to Retreive ASP.Net Controls value in JavaScript

How to Retreive ASP.Net Controls value in JavaScript
<script type="text/javascript" language="javascript">

function GetLabelValue{
     
try
{

    var sLblValue= document.getElementById("lblResourceSelected").innerText;

}
catch (err)
{

    alert("error ... .... ..")

}
}

</script>

////////////////////////////////////////////////


<asp:Label ID="lblResourceSelected" runat="server" Text="Selecte Resource From List">
</asp:Label>


            

No comments:

Post a Comment

How to add the .NET MAUI App Accelerator in Visual Studio

 To add the .NET MAUI App Accelerator in Visual Studio, follow these steps: Prerequisites: Ensure you have Visual Studio 2022 (17.3 or lat...