I have an aspx page associated with master page. In aspx.cs file I tried to call a JavaScript function using following code
//Code behind (aspx.cs)
ClientScript.RegisterClientScriptBlock(Page.GetType(), "javascript", "GetCmpValue()", true);
//aspx page
<%@ Page Language="C#" MasterPageFile="~/mlayout.Master" AutoEventWireup="true" CodeBehind="MResults.aspx.cs" Inherits="Predict.MResults" Title="Untitled Page" %>
//javascript function
<script type="text/javascript" language="javascript">
function GetCmpValue()
{
var CmpId=$find('bidLoc');
}
</script>
I am receiving an error Microsoft jscript runtime error object expected issue when page run in IE, but in Firefox and chrome you didn't find error message but still there is problem in calling JavaScript function. Could any one help me in resolving this issue.