I am struggling to call a JavaScript subroutine on the client-side after the server has completed its task. Even though I have tried putting breakpoints in <% ... %> areas between <script...>
and </script>
, it seems that VS2010 does not allow me to do so. This is making it difficult for me to understand how things are running. In my view, I have included the necessary JavaScript code for the function to run, however, it is not being executed as expected.
I just need to execute the "RunOnceRoutines;" but it is not happening!
My main concerns are: How can we effectively call JavaScript functions from the server-side, and why am I unable to find the JavaScript debugging feature that was available since VS2008?
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of FP.RatePicModel)" %>
<script type="text/javascript" language="javascript">
var RatePicPanelRunCount = 0;
function ChangeMainPic(newSrc) {
$get("imgPic").src = newSrc;
alert($get("imgPic").src + '\n' + newSrc);
RatePicPanelRunCount++;
}
...