CSS In App_Theme Folder Gets Cached In Browser?

Dec 23, 2010

The Stylesheet in the App_Theme folder gets cached in the browser. What should be the approach? so that whenever there is a new deployment the browser should take the latest stylesheets and not the one cached in the browser.

This was happening for other css(which are not in theme folder) too, so used custom control as mentioned in the link

[URL]

How this could be done for the CSS in the Theme folder?

Edit: The theme name is mentioned in the web.config as mentioned below. so its not just the html link tag which I had solved by using the method mentioned in the link.

<pages styleSheetTheme="Default">
<controls>
</controls>
</pages>

View 3 Replies


Similar Messages:

Browsing App_theme Folder?

Jun 16, 2010

Is there a way to stop someone from looking into the App_Themes folder, by putting it into the url, like this:

http://localhost/myapp/app_themes/

same with app_data, can those be blocked, i didn't try app_data as i don't have anything in there, but just curious, as app_themes I was able to get into. Is this an IIS setting I need to adjust?

View 6 Replies

Web Forms :: How To Tell C# To Read The Images From The APP_THEME Folder

Apr 12, 2010

I need to tell somehow to ASP.NET to read the images from the ASP.NET APP_THEME folder.

so instead of this:

[Code]....

View 3 Replies

Associating A CSS File Out Side App_Theme Folder For Skin/Theme?

May 7, 2010

Is there anyway i can mention which CSS file should be attached to my Page automatically when running A Page with ASP.NET Themes /Skins ? I want to associate my own CSS which resides in a folder other than the APP_Themes Folder to the Page

View 1 Replies

Asp.net - Visual Studio 2010 Doesn't Deploy App_Theme Folder

Jan 20, 2011

I have a simple web app project in Visual Studio 2010 (converted from 2008 project). For some reason when I publish the app, Visual Studio doesn't copy the App_Theme -folder to the publish destination folder. This will cause the app to fail when deployed to production environment.

App_Theme is considered as "system" folder by VS (shown as grey), which means that I can't manually set it's publish properties.

how to get VS to copy App_Theme -folder when deploying?

View 1 Replies

C# Code - Page Is Cached On The Browser Or Not

Jul 16, 2010

"Firstly check if "default.aspx" page is cached on the browser or not; if yes then Response.Redirect("default1.aspx"); else Response.Redirect("default2.aspx")

View 5 Replies

Javascript - How To Make Sure CSS/JS Files Are Not Cached On Browser

Nov 9, 2010

How do i make sure that for particular ASP.NET page CSS/JS file will not be cached on browser side (each time its loaded from server)?
Anything that can be done using the server side code?

View 2 Replies

How To Prevent The Credit Card Number Field Being Cached By The Browser

Apr 26, 2010

I have an input field on a webpage that contains a credit-card number. What is the best way of preventing the browser from caching this value?

Any solution needs to work on a large selection of browsers.

View 2 Replies

Web Forms :: How To Force A Browser To Refresh A Cached Version Of A Webpage

Mar 9, 2010

How to force Refresh( F5) conditaionally wehn the pages meet new design.

View 1 Replies

Web Forms :: Clear Browser Cache And Stop Pages From Being Cached?

Oct 25, 2013

when i first run my applcation some time its showing the data from cache.i want to avoid it in first time .

i want to cache my all images/css/js file what is the efficient way to do it.

i have lot of images folder /js /css files.

View 1 Replies

Configuration :: Client Browser Using Cached Files Instead Of Updated Version After Deployment

Oct 6, 2010

We have an ASP.NET web application and it's hosted using IIS 6.0, in the app we have these several javascript and css files located in a folder, and for performance sake (according to YSlow) we set the folder content expiration header to 1 year. Everything worked just fine until recently when we deployed the latest build to the server, in which we had made some changes to those javascript and css files. For some reason after the deployment some of our end users don't see the latest changes when they connected to the app, even after they cleared the cache in IE. We have also restarted the IIS on the server and the problem still remained. When I went into the IE Temporary Internet Files folder on one of these machines I saw the files were still the older version and not the latest one, I had to manually delete the files from the Temporary Internet Files folder then they were able to see the latest changes. I'm baffled by this, how come only some users who couldn't see the changes but some others do (without having to do anything by the way), and how do I make sure that for future releases we won't have to do anything like what did (manually deleting the cached files)? For now I disabled the Content Expiration option in IIS for these files but I would like to know if there is a way that I can enable the content expiration (to help performance) but at the same time making sure when the files are updated, the latest version will be used for the end user (instead of the cached version)?

View 3 Replies

Web Forms :: Reflect Recently Changed Image File And Remove Cached Image From Browser?

Jul 10, 2013

<asp:Image ID="aspImagePreview" runat="server" AlternateText="Preview" Height="190px" Width="290px" ImageUrl="~/file1.jpg" />

when the file file1 has been changed or removed. How can I do one refresh to the item to make it reflect the recent change?

View 1 Replies

Opening A Folder In A New Browser?

Sep 13, 2010

Developing a web application in C# which stores files in a tree structure in a server.

A project ( eg: ABC) has many sub folders (eg: ABC_sub1,ABC_Sub2...etc) . Each sub folder will have many types of files. (Eg: .dat,.txt .... etc)

I have stored the project name and the path to the parent folder ( in this case ABC) in a database.

Eg: \sereverNameTestMyProjectABC

What I need to do is when a user selects a given project ( eg; ABC) & clicks the link button component called "browse" to open the folder (\sereverNameTestMyProjectABC) in a new window.

This is the code I thought would work.

protected void LinkButtonFolderBorwse_Click(object sender, EventArgs e)
{
string myPath = @HiddenFieldFolderLocation.Value;
System.Diagnostics.Process prc = new System.Diagnostics.Process();
prc.StartInfo.FileName = myPath;
prc.Start();
}

HiddenFieldFolderLocation.Value gets the path of the parent folder (\sereverNameTestMyProjectABC).

When I click the link button nothing happens.

View 3 Replies

Web Forms :: How To Create A Folder Browser

Jan 17, 2011

In Visual Studio 2008 Express there is no folder browser to allow me to select a destination folder for downloading.

There is a FileUpload, but it requires a filename. I just want to select a folder only, and get its full path information.

In Windows API, there is a folder browser that I called in MS Access using VBA code.

Can someone supply me the code or tell me how to generate a folder browser to select a destination folder for downloading data to !! I would like it in VB.

I do have an .exe that generates a browser, but you can't run it on a website.

View 3 Replies

AJAX :: Folder Browser App Using TreeView On A ModalPopup?

Sep 24, 2010

I'm working on an ASP.NET (.NET 4, VS2010) app that needs folder browsing/picking capabilities. I've got it mostly working, but I'm stuck on one last thing. (see below) Also, I'm using AJAX UpdatePanel, TreeView control, and AJAX Control Toolkit ModalPopupExtender.

When I go to the page, I load the TreeView with a top node and a first set of child nodes, which are the found drives of the server. Then I click a LinkButton to open the ModalPopupExtender, which contains the TreeView. When I click the nodes of the TreeView, the node expands and builds a set of child nodes which are the folders found.

What I want to happen is to allow the user to navigate through the TreeView, selecting drives and folders until they find the one they're looking for. Then they click OK to return the path selected back to the main form.

The problem is that any click of any node in the TreeView causes a postback and my ModalPopup closes. how to accomplish this task? That is, how can I keep the ModalPopup open while the user clicks through nodes of a TreeView in which the child nodes are populated dynamically?

[code]...

View 1 Replies

Web Forms :: Build A Server Folder Browser?

Apr 18, 2012

i m trying to browse a folder using folderbrowserdialoge and got this error 

Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process.Source Error:

Line 64: ' If the user clicks theFolderBrowser's OK button..
Line 65:
Line 66: If theFolderBrowser.ShowDialog = System.Windows.Forms.DialogResult.OK Then Line 67:
Line 68: ' Set the FolderChoiceTextBox's Text to theFolderBrowserDialog's

[Code].....

View 1 Replies

App_theme Not Adding Styles To Web Page?

Feb 26, 2011

I have a web site project that uses an App_theme folder for styles. When I run the site the styles are not applied to the site. What is going on?It works on other developers computers, but they are using a local IIS 7 server whereas I am using the built in Visual Studio IIS. Note - the site is setup using a web site project (not application).

View 2 Replies

Web Forms :: Get A List Or Folders In The App_Theme Directory

Aug 6, 2010

I would like to display a list of all the Themes in the App_Theme directory and allow the user to select the theme they would like to use. Is there already a method that would return the folder name back to me in the app_theme folder?

View 1 Replies

Web Forms :: How To Open Folder Browser Dialog - Failed To Set Specified COM Apartment State

Jan 7, 2012

I want to open FolderBrowserDialog,

I am getting error as

"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process."

Then I added

System.Threading.Thread.CurrentThread.SetApartmentState(System.Threading.ApartmentState.STA)

And I got error as "Failed to set the specified COM apartment state."

Here is code

Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyFolderBrowser As New System.Windows.Forms.FolderBrowserDialog
' Description that displays above the dialog box control.
System.Threading.Thread.CurrentThread.SetApartmentState(System.Threading.ApartmentState.STA)
MyFolderBrowser.Description = "Select the Folder"

[Code] ....

View 1 Replies

User Controls :: How To Browse Folder Using Browser Button From Any Location On Server

Apr 17, 2012

i'm creating a asp.net web application in which i need to select source file using browse button to select the Source location from where the files has to be copied from and destination file using browse button to select the destination location where the files has to be copied to .So pls tell me what should be the code for browse button to browse a folder for source and destination and copy the source folder files to destination folder(i want to copy only text and excel files from source to destination folder) and i want user to see the progress how files are copying from source to destination and error also if there is any error in copying.

View 1 Replies

Data Controls :: Open And View Files From Folder In Browser Using Button Inside GridView

Oct 18, 2013

I need to open/view a file in gridview.... I successfully uploaded the file to a directory on the server, and added a filename field in a table....

I can view the table data row by row, but now want to click on the file or SELECT in that row - and that click event must open the file for me....

View 1 Replies

App_browser Deployment / Create A Browser File In The App_browser Folder?

Mar 9, 2011

I have written a PageAdapter that handles viewstate persistence in a SQL server. This page adapter was created in it's own project so that i can reuse the DLL on other projects.

I have another project that is acting as my test web application. I added an entry the configuration file for the new database connection string. I also had to create a browser file in the app_browser folder. I will tell you upfront that I am not familiar with the app_browser and browser files at all. So this is probably a setup issue.

I have this solution working properly on development. I then tried to deploy my project using a web deployment project to compile the application, and then manually move the output to the test server. On the test server, it acts like it is not reading the app_browser folder. My code never gets executed. I started up a remote debugging session and my code never fired. All of the necessary files are there.

The server is windows server 2003 standard edition with SP 2. It is 32-bit. It is running IIS 6.0. We have all of the .Net frameworks installed. IIS is currently configured to run framework 4.0. My code is using 2.0.

I am not finding a whole lot of information online about it, but I know I can't be the first to have this issue. Please someone help me out here.

Below is the contents of my browser file.

<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.Page" adapterType="BEKCustomViewState.BEKViewStatePageAdapter"/>
</controlAdapters>
</browser>
</browsers>

View 1 Replies

Page Not Being Cached?

Nov 29, 2010

why all the resources in my page are being requested EVERY single time. E.g. my site.css returns the following headers (using fiddler):

HTTP/1.1 200 OK
Server: ASP.NET Development Server/9.0.0.0
Date: Mon, 29 Nov 2010 17:36:21 GMT
X-AspNet-Version: 2.0.50727
Content-Length: 9093
Cache-Control: public, max-age=2592000
Expires: Wed, 29 Dec 2010 17:36:21 GMT
Last-Modified: Mon, 08 Nov 2010 17:20:16 GMT
Content-Type: text/css
Connection: Close

But every time I hit refresh I see all the resources (css,js,images) getting re-requested. I have control over the headers returned for any and all of these resources, but I haven't figured it out yet.I have even debugged my ASP.NET app and the HttpModule is definitely being asked for the resources again.

EDIT:Ok, I removed must-revalidate, proxy-revalidate from the headers and that is getting me closer to where I want to be, now when I press back it still requests my css/js files when I press back.

View 2 Replies

C# - How To Add An Item To A Cached Collection

Mar 29, 2011

I would like to cache a collection in the viewstate, but I wonder if there is a better way to add an item to this collection!

private List<MyClass> CachedItems
{
get { return (List<MyClass>)ViewState["CachedItems"]; }
set { ViewState["CachedItems"] = value; }
}
private void AddToCachedItems(MyClass item)
{
CachedItems = CachedItems.Concat(new[] { item }).ToList();
}

View 1 Replies

Possible To Detect Whether An ASP.NET Page Is About To Be Cached

Apr 20, 2010

Is it possible to detect whether an ASP.NET Page is about to be cached and if so, how?The HttpCachePolicy object provides only set-methods. The VaryByParams name-value collection is useless if values other than "None" and "*" are set as it impossible to enumerate them and you can only access them by key

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved