Web Forms :: Stop Loading Files In App_themes?
Dec 8, 2010All files in App_theme folder is loading when enter the URL I wanna stop loading files in App_theme folder ,How can I do this?
View 3 RepliesAll files in App_theme folder is loading when enter the URL I wanna stop loading files in App_theme folder ,How can I do this?
View 3 RepliesI have an application where different users can log in via a single portal login. When they log
in, if they belong to more than 1 company they have to select the company they belong to. The theme will change if there is a custom theme for that company. Each page my application has inherits a "CustomPage" class. Here is the code for the custom page:
public class CustomPage : Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
if (Globals.Company != null && Directory.Exists(Page.MapPath("~/App_Themes/" + Globals.Company.CompanyName)))
{
Page.Theme = Globals.Company.CompanyName;
}
else
{
Page.Theme = "Default";
}
}
}
When the customer belongs to more than 1 company, and they select the company they belong to, the theme loads just fine. So, the problem I am having is this: If they belong to just 1 company, the company is automatically selected but the theme does not load right away. However, if I refresh the page, the theme loads just fine. Even the default theme will not load. The page has no css at all until I refresh.
I even view source and look for my css names and they are not there. I refresh and do the same thing, and they are there. I am not using forms authentication and the default theme in the web config is "Default"
<pages theme="Default">
I have an ASP.NET (C#) page that has a long load time (like 2 minutes). The user is presented with a little animation and a "please wait" message. If the user accidentally loads this page, they need to wait for it to load.
My question is: Is there a way to stop the page load?
So imagine a piece of Javascript as the first script on a page along the lines of
var MySuperObject = new (function () {
this.SuperObjectInit();
})();
Now imagine that everything that proceeds this script (or a large portion therein) requires the SuperObject to have met its load conditions and loaded correctly.
Assuming for whatever reason the loading of the object fails I need to abort loading the rest of the page and the scripts in particular.
I know the majority of you are going to scream why not have your function issue a callback onSuccess and onFailed but the problem is this is in a ASP.Net project with masterpages, nestedmasterpages, usercontrols and so forth (each of which have their own dependencies and scripts); rendering such an approach problematic.
The other option (I assume) is to use window.location = "myErrorPage.html"; but I dont like the idea of having to create another page for an error message or the fact that it causes a redirect.
What I am hoping to do is something along the lines of
StopLoadingPage();
document.write("Error has occurred");
i have made an .aspx page of c# in folder named as "USERPANEL". Also placed all my js in "js" folder and css files in "css" folder & all these pages are placed under "USERPANEL" folder same location where i have create a page. If i would placing the css on the page itself then it's working but not loading any external stylesheets. why? below is code as i am attaching the fontawesome file placed in fonts folder.
<link rel="stylesheet" type="text/css" href= "fonts/font-awesome.css" runat="server"/>.
What is better way to large upload file. using a web service or in application itself. If in application, how can we check that files is to upload. actually i dont want user to wait for complete uploading, when it starts uploading user will get response of uploaded and uploading will be done in backgroud. I am not sure this type of task can be done in webservice also so that user doesnot need to wait for complete uploading. and one more query which event fires when the page redirects to another page. Is it Page_UnLoad or Dispose.
View 2 RepliesI'm trying to stop the rest of a page loading based on some parameters; but am not sure of the correct syntax.
@if(dayRes + dayTri == 2){<text>Sorry, etc</text> @Response.End}
The above throws this error: CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
i created a web project (c:/project/website1) but can i call the themes file which is located at different directory (d:app_thems) ?
due to some server settings, the hosting company not allow me to store images in my web project.
i would like to load a banner on to the page based on the registration count we have in the DB. if the registration count is >70, i will have to load banner2 on to the page. i am doing like this On the webForm.aspx
<img src="images/banner1.jpg"
runat="server"
id="imgs"/>
in the code behind
protected void Page_Load(object sender,
EventArgs e){
if (!Page.IsPostBack)
{
if(isSessionOneFilled())
{
imgs.Src = "images/banner2.jpg";
}
}
}
The above code works. is it Good Programming to load html files from codebehind? is there any alternative way? how does this impact when internet speed is slow?
I have a small problem because when i click on my Button to export the excel data, i have a short waiting time (about 6 seconds) and i would like during this time displaying a progress bar. How to resolve this problem and implement the progress bar?
View 1 RepliesOn App_Theme folder I have lots of images, and when I open VS2008 it performs really slowly performance.
it takes about 10 minutes to open the solutopn, and when trying to view site on browser it takes more 10 minutes to view the first page. after that, it is OK.
I am using Master Pages for my site(VS-2005). A page in my site gives user information about a city which he has selected from a drop down list. I want that when a user selects a city's name from a drop down list control, then a particular XML file of that city should get loaded into that page. The ASP.NET page should remain same but only data should change. If a user has chosen London then the XML file of London should be loaded, if the selection is Paris then XML file of Paris should be loaded.
View 2 RepliesI recently ran yslow on a page i have (master paged etc) and it returned that there were far too many javascript files included (most of which I haven't added).
I guess my question is that given i have v1.0.20229.0 of the toolkit.dll (over .net 2)
I'm wondering if subsequent releases have fixes for this sort of thing?
From what I can see, .NET does not allow the use of multiple global.asax.vb within a project.This is my situation:I have a "web project" that I use as my base project for all of my other projects. This base project has a global.asax.vb file that runs cleanup code, etc. It also loads databases that I want to use within the base project. I then have these other projects that take advantage of the base project to save development time.My Problem:When project A and B load, they also needs to perform tasks within Application_Start and Session_Start specific to those projects only. I don't want to put any code for project A or B within the base project's Application_Start or Session_Start. I want to isolate the code for each project to that specific project only and keep my base project 'vanilla' and independent of any project that I build on top of it.Does anyone know how to handle this situation? I had the idea of trying to load modules contained within a folder by the base project, but that didn't seem to work out.
View 3 RepliesQuite some time ago I used an old version of the AjaxToolkit. Now I decided to load the newest version.
Below code shows me the HEADER and CONTENT ok, HOWEVER:it seems that no theme (skin, CSS) areused / found / recognisedwhen running the page I see the header and content I even can click the header and the text fades away correctly!I used drag/drop from the toolbox in VS2008
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyEvents.aspx.cs" Inherits="MyEvents" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
[code]....
I have used a external js file for a upload operation in my page.. once the file get loaded in temporary folder, it gets loaded from there even if new changes are made the old version that exist in temp folder gets loaded... i have writtenResponse.Cache.SetCacheability(HttpCacheability.NoCache); on my page But it still loads the js file in cache. When i cleared the temporary files manually it works fine...But i cannot ask my client to clear temp folder,,,Is there any solution to load js file not from the cache, ie reload every time page is loaded...
View 2 Repliesthe only way to make themes work is to allow user "Everyone" to access the folder App_Themes. I am wondering if a more specific user instead of "Everyone" can be granted the access to allow themems work.Account "IIS_IUSRS" and "NETWORK SERVICE" have already been granted access.This is about folder access of Windows 7 running IIS7, not web page authorization configured via web.config. The web page is browsed via local host (i.e. the web page address is something like "[URL]
View 1 RepliesI wanted to combine app_themes css files into one on the fly. I did so using Mads Cristensen technique. But now all elements that has background image defined through css (see picture) don't display image. I believe that is because css files are not relatively referenced anymore (../), but through axd file. I'm trying to fix this by changing reference to image files without success. I already tried background: url("~/App_Themes/44/images/myimage.gif") and this works for pages that combined css. But the problem is that there are other pages in this project that don't use this css combining and now they lost reference to background images.
View 1 RepliesI have update panel on the page to avoid postback and placed a dropdownlist control within that update panel. DrodownList is filled with Category names and also it's autopostback set to True.
Now whenever dropdownlist index change's on select, untill page loads complete data it should show mesage as "Loading.... in center and middle of the page and background should become bit transparent". And when page load completely with data then that background and message should get disappear.
i have developed my asp.net application along wih crystal report .... i need to show loading image on ever client and server side request .... (i.e) like when ever IE progress bar get loading i want to show my gif loading ... after IE progress bar finish its loading, my gif loading image should disappear .
View 2 RepliesI want to display a loading animation while my page is loading, and when loading is complete then obviously hide it.
I am working in ASP.NET using Masterpages, just wondering there is a a simple way of doing this using JQuery?
We have installed a web site written by others which is compiled with Visual Studio 2008 and hosted in Windows server 2008 R2.
The IIS connection timeout is set to 120 seconds. But for some pages, the first page loading fails with HTTP 404 error but sequential refresh can bring the page up. The same problem happens for some images which fail to load in web pages. We are not very sure it is network related issue or hosting issue.
i have the falowing methos used on my website to capture client certificates that is instaled on the server and he works frequently well
[Code]....
The Problem is that for some times he works return the certificates but from a time to other he stop working and nothing return with no errors the only way to he become working again is to stop and start the Application Pool in IIS.
i have a page which consists of a drop down box.in that drop down box i am having two values namely start and stop. i enable the autopostback property to true. when user selects start or stop from dropdowm box, the page is refreshing.now what i want is...when the user selects stop from dropdown box..the page should nt refresh.
View 2 RepliesI'm going to check the database schema at Application_Start event handle in the Global.asax file. If something wrong, I hope to stop the application instead of just catch an exception.
View 2 Replies