.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

big banner cached

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :ASP.Net


I've built a web site with a big banner ... every time I change, post back or update the page the banner keep several second to show...

is there any way to cache it and read the cache to see it istantanealy ?

View Complete Post

More Related Resource Links

Send HTML email with banner inside


Hi all,

I want to send html emails with one promo-banner inside. Have a look at my code... I try but with no success.


            Dim strFrom, strTo, strSubject, strBody As String
            Dim myMessage As MailMessage
            Dim mySmtpClient As SmtpClient
            strFrom = "SENDER<test@example.com>"
            strTo = Session("eemaill")
            strSubject = "HELLO THERE!"
            strBody = "HELLO THIS IS MY MSG<br />" + _
            " <script type='text/javascript'> var ai = 899; var rc = 40; var rt= 2; var rc_width = 724; var rc_height = 90; </script>" + _
            " <script type='text/javascript' src='http://assets.example.com/s/ads.js'></script><br /><br />" + _
            "<b>THANK YOU</b>"
            myMessage = New MailMessage(strFrom, strTo, strSubject, strBody)
            myMessage.IsBodyHtml = True
            mySmtpClient = New SmtpClient("mail.example.com")




Thank you

problem with banner s structure

 Hello everyone,   Last night I was watching the banner of the first page of this website I mean this address http://www.asp.net/ and when I save background of that (I mean the blue part)I could not understood how it was made could you please help me to understand how I can do that?

Refresh Cached image

Hello! I have an Image that is cached because I want to be able to change the file on runtime without getting exception about the file being in use. This works fine, but how can I programatically force a refresh of the image from file. I have a function that replace the file, so it would be nice to have a refresh function.  Is this possible?   <Image Name="imageThatIWouldLikeToRefreshFromCode"> <Image.Source> <BitmapImage UriSource="C:\image.jpg" CacheOption="OnLoad" /> </Image.Source> </Image>

background image in banner, over-ridden?

Hi folks, I am working on a master page with a stylesheet.css I put together.  Originally, I set the background as a simple color for the banner attribute until I had an image.  Now that I have the image, I have replaced the background color with the new image in the css file.  While in design mode, it works.  The background color has been replaced with the image.  However, when I run the application, it defaults back to the color (green for simplicity).  I am not sure why this is happening.  Somehow the original background is being pulled from somewhere, and I do not know where.  Has someone had this happen as well?  Why would the background image be displayed in Visual Studio, and then revert back to a previous setting when you run the application?Here is the master page <!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 runat="server"> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> <title></title> <link href="StyleSheet.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form2&q

How do I have a banner that doesn't scroll?

Can someone please point me to an example of how to, in MVC 2, do a master page so that the banner/menu area of the page does not scroll with the rest of the page? In the past with ASP Classic, I would just use Frames... Richard  

Cached Javascript file using feature VS 2010 - Bug?

Hi, I am using a custom action in an element.xml to reference an external script in my SP2010 solution - by adding a SP 2010 layouts folder and adding the script in there. Everything deploys and runs fine, however, if i update the javascript file and redeploy the solution, when debugging the javascript, the old (non updated) file is loaded and executed. I have tried retracting the feature and re-deploying, cleaning the solution, rebuilding and deploying, yet the javascript file loaded dynamically is still the old file. It seems to be updated intermittently, however, this is quite awkward as I cannot accurately guage when the file is refreshed. I am closing the IE window after every debug session.  Is there a process I should be following to ensure that the script is updated every time? Any help would be greatly appreciated. Cheers.      

Custom Ribbon Feature is Being Cached

Custom Ribbon Feature in Sharepoint 2010 is being Cached by IE using the following file "http://....../_layouts/commandui.ashx?ver=-1002291061&id=Ribbon.CustomCalendar.EventsTab&lcid=1033&qt=ribbonvisibletabdeep After changes are made to the Feature and then deployed the new changes do not show up unless this File is deleted from the Browser. Is there a way for the Browser to detect new Feature and automatically downoad it? Any ideas?   Please help.  

Login Page issue with the Banner



I'm using Visual Web Developer 2010 Express.

I've published the application however when I view the login page the banner is not displayed I just get the red x.. It's fine in pages in other folders but not the Login page which sits in the Account folder however I'm getting the menu so it seems to be picking up the master page.

I've added the image to the Account folder but it just wont show, any ideas?





<%@ Page Title="Log In" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Login.aspx.vb" Inherits="PODPortal.Login" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
        Log In
        <asp:HyperLink ID="RegisterHyperLink" runat="server" Visible="false" Enab

Webpart comes with old results as page is being cached


Hello All

I am developing one website and made below mentioned configuration for enabling caching for Anonymous User.

1)  Created a cached profile and enable caching, set cachebility as ServerAndPublic and kept duration of 180 seconds

2)  Applied this cache profile to "site output cache ->Anonymous Cache Profile ->  Select a page output cache profile"

Due to the above configuration pages in my site are getting cached for 180 seconds.

Now i am having one webpart on home page but each time i hit the page it gives me cache results in that webpart and do not postback to server and bring new results

I want to have server trip for that webpart compulsory as there are certain business conditions applied and if it will not postback those condition will not apply and webpart will not function properly or render properly according to condition.

Can anybody give me solution for this so that page/webpart postback and the serverside code executes.

Thanks & Regards

Mrugank Dholakia

Aero Glass Desktop Banner

First, I'm not a developer.  I was wondering if anyone has created or how difficult would it be to create a Desktop Banner that would reside and across the top of the desktop and  that could be used to display the security level of a desktop (ie., Unclassified) and that is persistent.  I was looking for something transparent like the Aero Glass feature where it would not get in the way of maximized windows.  Can some point me in the right direction or give me some advice?  Thanks


how to edit swf file placed in banner


Hi all.

I want to re design a web site. so that i found a layout but it was a premium ones..

how ever i extracted the swf file.. but cant edit that


I need to edit that navigation..menu bar contents.. how to do that?

also i shud keep my images in image slider there...

suggestions plz

Windows Security Login popup for 3 times after logged in after changed theme banner


Hi experts,

I do have problem with my SharePoint theme. I have actually create new theme by customized a theme from the default theme in SharePoint. I have replace with new banner and do some changes in the coding site.

After i have applied the theme to my portal, i face problem when i try to logged in using a username from Read Only group, it will appear the windows security login for 3 times before the portal can be access, unfortunately the banner are still not visible. Sometimes, its appear, sometime it didn't. 

However, when i logged in user System Account, i have no problem accessing the page without windows security login appear and the banner are there.

What am i missing, please do let me know. Thank you.

SharePoint GlobalTitleArea (Banner) Customization

Well I sure hope someone here can help me answer this question.  I have spent hours trying to 'make' it work for me using SharePoint Designer.  I have also spent hours trying to find online instructions on how to do this.
Here is what I want to do.  I need to replace the white space in at the top of the defaul SP Template with a colored banner.  The thing is that I would like it to be a background just for that section.  The issues that I am running into is that since that top banner section is made with a 3 celled table within a table (nested), it just keeps repeating the image in each cell...which just looks weird.  I want the colored banner to span the entire height and width of the top banner are (in SharePoint Designer it is the GlobalTitleArea.  The Banner will be behind the Logo which I have already replaced with my company's custom logo.
I hope that I haven't confused anyone and that someone can help shed some light on this for me.

Client browser using cached files instead of updated version after deployment



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

Get ContentPlaceholder Beneath Banner


I have the following MaterPage. Unfortuantely, the ContentPlaceHolder overlaps the banner. The last table which is the footer is behaving the way it should (absolutely fixed at the bootom).

What am I doing wrong with this? Or have I done it all incorrectly? Why does the ContentPlaceHolder overlap the banner?

I basically need a banner page that is absolute at the top and 100% width and directly beneath that I need the ContentPlaceHolder at a width of 100%.


<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MyCompanyMaster.master.cs" Inherits="MyCompanyMaster" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <asp:ContentPlaceHolder id="head" runat="server">
    <style type="text/css">

Datagrid view control producing duplicate data results when data is cached


I have a datagridview control that I'm using to display cache data to the end used on a web form. The issue that I'm having is that every time I re-run the application, and the cache data is re-generated... it loads duplicate data that's being displayed to the end user. I can't seem to figure out how to keep this from happening.

What I would like to have happen is that only unique data rows be returned and cached for the end user. Unless there are new data rows on the database that needs to be included in the cache data results...the previous data results should not be duplicated. I've tried to change a few properties on the datagridview control, but nothing seem to keep this from happening. I have included a copy of my code below. Any help would be greatly appreciated.


' Code that is used to cache data that's returned from database

Protected Sub PopulateNewhardwareSetInfo()

   Dim conn As SqlConnection = New SqlConnection(m_connectionString)

   Dim cmd As SqlCommand = New SqlCommand("Select * from HardwareSet", conn)  

   Dim sqlDA As SqlDataAdapter = New SqlDataAdapter(cmd)      

   sqlDA.FillSchema(m_ItrackerData, SchemaType.Source, "HardwareSet")

Display a custom banner which fills the entire top of the banner section


Hi I want to Display a custom banner which fills the entire top of the banner section, but still lets all the other graphics display, and ribbon. Can any one lwt me know how to do...

Thanks in advance

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend