I appended a "?ver=<%= DateTime.Now.ToString() %>" to the link tag href value.
<link id="lnkPdfStylesheet" runat="server" href="/css/pdf.css" rel="stylesheet" type="text/css" media="all" />
ExpertPDF and Caching of URLs
I think I know who I am (whoever that is), and I think I want to be that person with you (whoever you are).
<link id="lnkPdfStylesheet" runat="server" href="/css/pdf.css" rel="stylesheet" type="text/css" media="all" />
//upnlControl is an UpdatePanel defined in the .aspx
ScriptManager.RegisterClientScriptBlock(upnlControl,
upnlControl.GetType(), upnlControl.ClientID,
"$(document).ready(someNamespace.init);", true);
// namespace
var someNamespace = someNamespace ? someNamespace : {
/*
* handleSomeClickEvent
* handles some click event
* when something is clicked
* inside the update panel
*/
handleSomeClickEvent:function() {
alert('Wow! This runs every time the element is clicked!');
},
/*
* Init
* Initializer that will run
* on each page load.
*/
init: function() {
// setup event handlers
$('.someSelector').click(someNamespace.handleSomeClickEvent);
}
};
// kickoff someNamespace.init when DOM is ready.
$(document).ready(someNamespace.init);