Most all of my ASP.NET web applications use master pages. I have learned that when writing javascript to get the element by id you must write code simular to the code snippet below:
function updateImage(productID, imageID) {
document.getElementById('<%= productImage.ClientID %>').src = "../ProductImages/prod-" + pad_left(productID, '0', 6) + "-" + pad_left(imageID, '0', 2) + "-xl.jpg";
}
The focus here is the <%= productImage.ClientID %> ... this is used to get the actual client id of the control productImage since a masterpage will modify its actual ID. All of this code works great under normal circumstances, however I recently added a Multi-View control and have realized that the code/controls that are on a view which is not the "active" view are simply not present therefor the javascript code (actually the c# code) which is defined inside the javascript block tries to resolve the ...
Go to the complete details ...