[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Changes to .js file in Visual Studio 2008 do not take affect even after saving and building

Posted on 2011-03-02
Medium Priority
Last Modified: 2013-11-26
I'm in the process of developing a .NET application in Visual Studio 2008 using VB.net, JavaScript and jQuery.  The problem is occurring on my development machine which is running Windows 7.  The first page to open is a log in page, Login.aspx, that contains references to three external JavaScript files including one called Login.js.  When I make changes to this file they don't always take affect even if I manually save the file and rebuild the solution.  This had been occurring periodically but today no matter how often I go through the process the change does not take affect.  In this case the change is commenting out one line that changes the height of a jQuery dialog.  I've attached the HTML and JavaScript.  The line that was changed is 53.

When I set a break point  where the dialog is created and run the VS debugger the line shows up as being commented out but after that line is passed over I can see that the height of the dialog has changed from "auto" to 850 by checking the height option in the watch list.

Yesterday I had made a change to correct an error and ran the app with out debugging.  The error still occurred and when I ran an external debugger it showed the file as being unchanged even though in Visual Studio I could see the change.

Any suggestions would be greatly appreciated.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link href="~/Styles/Dialog.css" rel="stylesheet" type="text/css" />


    <script src="<%=ResolveUrl("~/js/jquery/jquery-1.4.2.js")%>" type="text/javascript"></script>
    <script src="<%=ResolveUrl("~/js/jquery/jQueryUI.js")%>" type="text/javascript"></script>
 <%--   <script src="<%=ResolveUrl("~/js/jquery/jquery-1.4.2-vsdoc.js")%>" type="text/javascript"></script>--%>
    <script src="<%=ResolveUrl("~/js/Login.js")%>" type="text/javascript"></script>

    <form id="frmLogin" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
                <asp:ServiceReference Path="~/WebServices/LoginService.asmx" />
                <asp:ServiceReference Path="~/WebServices/ServiceSetPrimaryGroup.asmx" />
        <div id="divLogin" title ="Login">
            <div id="lblLoginMessage" class="Message" visible="false"></div>
            <span style="display:inline;">User Name:</span>
            <input type="text" id="txtUserName" style="width:150px;" onchange="UserNameEntered(txtUserName.value, lblEmployeeNumber, txtEmployeeNumber)"/>
            <br />
            <span style="display:inline;">Pass Word:&nbsp;</span>
            <input type="password" id="txtPassWord" style="width:150px;" />
            <br />
            <span id="lblEmployeeNumber" style="width:118px; display:inline; visibility:hidden">Employee #:</span>
            <input type="password" id="txtEmployeeNumber" style="width:150px; visibility:hidden" />
            <br />
            <span id="lblGroup" style="display:inline; visibility:hidden">Group:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</span> 
            <select id="ddlGroup" style="width:158px; visibility:hidden"></select>
            <br />

function OpenLoginDialog()
// The Page_Load procedure of Login.aspx has registered a Startup Script for the page that calls this function when the Login.aspx page is opened.
// This function creates a Jquery dialog box out of divLogin which contains the fields neccesary for loging into Client Track.
        height: "auto",
        buttons: { "Login": function() { Login(txtUserName.value, txtPassWord.value, txtEmployeeNumber, ddlGroup) }, "Cancel": function() { window.close(); } }

    $("a.ui-dialog-titlebar-close").css("visibility", "hidden");
//    $('div#divLogin').dialog("option", "height", 850)
        if (e.keyCode == 13)
            $("div.ui-dialog-buttonpane button:first").click();

Open in new window

Question by:leskelly
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 13

Expert Comment

ID: 35018634
Clear the browser cache. Go to Tools > Internet Options > Browsing History > click Delete button.

Author Comment

ID: 35018694
That did the trick thanks.  Is there no way around this or do I have to do this every time I make a change?
LVL 13

Accepted Solution

devlab2012 earned 2000 total points
ID: 35024302
Set the http meta tags - PRAGMA, CACHE-CONTROL to "NO-CACHE".

Also, in IE, go to Tools > Internet Options > Browsing History > Setting > under "Check the newer versions of stored pages" select "Everytime I visit the page".

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question