.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

Need help with partial page caching

Posted By:      Posted Date: August 24, 2010    Points: 0   Category :ASP.Net

I have a banner on the master page that I don't want cached even though some of the content pages are cached.  I'm using the adrotator control, which I know doesn't cache, but I have code in the AdCreated event, and that does cause it to cache.

I've been struggling with this for several days now.  I've tried putting the code in another page and using an iframe to display it.  This worked except at times what got displayed was the headers of a page within a page withing a page.  This would mysteriously come and go, but when it happened, it would crach browsers and it looked terrible. 

I'm thinking of using ajax, but I don't already have a scriptmanager control on the master page.  Before I remove the scriptmanager control from all the content pages, I'd like to try to use partial page caching.  I've Googled it, but I don't understand what I've read.  CAn someone simplify this for me?

View Complete Post

More Related Resource Links

is the page caching?


I am just trying to understand the basics flow to the MVC framework by putting in some breakpoints in the beginning of the actions of a couple of controllers.

One break point is at the HomeController/Index action where it just returns View() of the "Welcome to MVC".  The Second break point is at a SecondController/Index action where it uses the Entity Framework and returns a View() of a list from the db.

When I run this in debug, it breaks at the points I expected when I go from Home page to the Second page controller and back to Home.  However, when I go to the Second page again, it doesn't break at all?  Is the results of the Second page being cached and how and where?  How do you trigger for it to get check if data is old?

I check to see if the persistence is done on the db, by changing the value of a field on the db side and it still did not cause it to break on that action and displays old information in the view.  I am concerned because it is displaying incorrect values on the UI.  I do not have the OutputCache attribute above this action or specified any cache on my web.config.

Thanks in advance for your time :)

Partial Views and Popups...After clicking on Close need to refresh the page....


Hi All,


I amusing the PopUp example as suggestedin the above forum link.....

But now i want to Refresh the page after clicking on Close(x) ...

So please help me....

Please advice...

Thanks in advance...



Caching multiple copies of a page

Hi Guys, I have  an aspx page that retrieves and processes an image based on a  query string.The whole operation takes about 2-3 seconds.  However as the nature of the images means they are quite static,a 5 min (or even 5 hour) delay in picking up an updated image is acceptable. Because of this delay I would like to cache the response and only do a proper refresh only periodically. I have added the following to the top of my aspx page.  <%@ OutputCache Location="Any" Duration="600" VaryByParam="*" %> Only the last request appears to be cached - i.e. f  I navigate to ../DisplayImage?ImageId=1Then the page is loaded and Image 1 displayed - subsequent requests are cached.If I navigate to ../DisplayImage?ImageId=2 subsequent requests are cached.However if I go image 1, image 2, image 1 then no caching occurs. I'm wondering if i'm missing something obvious or does IIS7 / ASP.NET just not support this type of caching.Any help would be greatly apreciated.Malachy

Display popup with partial page postback


 I am using an updatepanel and a grid is placed within the same.Now,I have a checkbox corresponding to each row of the grid.If I check it,say corresponding to one row and click a button(placed outside the panel), a popup will be opened which is a separate aspx page having its own functionality.

The requirement is like I need only the panel to refresh not the whole page.

Is this possible?Any help is appreciated.

Partial Page Updating


I have a simple Jquery that runs on load, but after partial page rendering it doesnt work, here is what I am trying, this isnt even working on page load.

<script type="text/javascript">
            function addHandler() {   
                var runningTotal = $("#dnn_HiddenField1").val();
                $("#MRRP").html (runningTotal); 



Thanks in advance

is server caching my page ?


Hi there 

I am making some modifcations on a ascx.cs page. When I upload the page to the server, it seems that the changes I made are not taken on board.

In fact if I put a response.redirect or if I remove the page altogether, nothing happens, my page appears on my browser as if nothing had happens. However if I make changes to the ascx page, I can see the changes straight away after uploading.

Even more bizarre, if I open my ascx page and if I remove CodeBehind="Page.ascx.cs" from the top line, I would expect the page to crash, but no, it still works. 

So it does look that the ascx.cs is cached and that whatever I do doesn't overwrite it.

What can I do ?



ASP.NET partial page upload without Updatepanel /With jQuery and example


I have an ASPX page .In the Top i am displaying 5 categories (Ex : Pen,Book,Shoe,Mobile,Mirror) When i click on any of the categories,I want to show the products under that category below the header. I dont want to reload the entire page for this.I want to maintain my page as it is (The header,footer and side panels would ) when a click happens except the center place of the image (may be a DIV or Table to show Product). Whats the best way to do this ?.I dont want to go for the ASP.NET Ajax update panel.I am already using jQuery in my project.So is there anyway to do this with jQuery ? Please advice .Thanks in advance

partial page returns an error, the same code on a full page doesn't


i have after a lot of help and some major frustrations, finally got my database returning data. i am using a .edmx file to hold most of the database information and some additional model classes (for instance particular queries joining 2 tables)

i have a model


namespace iliteratimvc.Models
    public class TitleModel
        public string MsTitle { get; set; }
        public string MsDescription { get; set; }
        public DateTime MsUploaded { get; set; }
        public int Status { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }

and controller code


public ActionResult RecentMSS()
            var rmss = (from m in ilitAuth.Manuscripts
                        join a in ilitAuth.AuthorDetails on m.MsAuthor equals a.UsID
                       where m.Status == 1
                       orderby m.MsUploaded descending
                        select new TitleModel
                            MsTitle = m.MsTitle,
                            MsDescription = m.MsDescription,
                            FirstName = a.FirstName,
                            LastName = a.LastName
            var rmssList = rmss.ToList();

Output caching a page that requires sql authentication


My understanding of output caching is that a full page is rendered and available at the application server to send to any clients that may request that particular page.  So if you have 5,000 different client requests, each receives the cached page on the server, instead of 5,000 independent connections to the database to retrieve the same exact information.  Another way of looking at this is that the application server, upon an initial visit, connects to the database once, gets the data, renders the pager, and stores it for a period of time to send to any client that requests it.  It's awesomely efficient, really.

My question is what happens if the connection to the database requires authentication?  In this case, to authenticate each of the 5,000 users, must a new connection be opened to verify the user before the caching can be taken advantage of.  I hope not, but how does the application know whether or not to share the rendered page with an unauthenticated user?




Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Using jQuery to directly call ASP.NET AJAX page methods

Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods

Reduce ASP.NET Page size and complexity using JQuery

This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.


I have 2 web pages. First page has a textbox and a button control.

when I enter test and click on the button , system goes to the second page. And in the second page I want to access the Textbox in the first page. When I try to do this I get the following error.

"Object reference not set to an instance of an object. Following is my code :

Dim txt As New TextBox

' Find the server name on the previous page
txt = CType(Page.PreviousPage.FindControl("TextBox2"), TextBox)
If Not IsNothing(txt) Then
Response.Write("[Name Not available]")
End If

I know I could do this with session, but I want to use the Page.PreviousPage.FindControl. Any help is greatly appreciated

Unique content within master page based on conditions met


 Hi all-

I would like to present users with unique content based on certain conditions being met as they land on the home page (default.aspx).  The condition logic will be in the VB code behind Page Load event. The content will go in a content placeholder as specificed from the master page. 

However, the content change wouldn't be something small (ie making a panel or label visible or not) but rather it will be different HTML,  Divs and databound gridview content.  The HTML content will be stored in the database.

Can someone point me in the right direction for best practices on how to accomplish this?


Launch CMD File From ASPX Page


My organization uses a CMD file to install updated files for a major enterprise application. Currently, we send out an email to users with a link to the file and instructions to run it, BUT inevitably users don't update their machines until their in field and try to start the app.


We're now liking the idea of using an ASPX page to prompt the users to run the updates and to capture the fact that the updates have been run. I realize that we can't capture the success or failure of the update. But we'd like to capture the user accessed the page.


Is it possible to embed into the markup for the page a link to the file on the local intranet that the users can click on to run the file?

The user accessing the page would capture that they did just that. We'd deal with wether or not the update was actually installed or if it failed later with them directly.

Handling 404 page not found with Error page



      How do i handle 404 page not found?

Setting the default start page in godaddy hosting?


 How do you set the start page with godaddy hosting? I can see no way of doing this! You do not seem to have access to the IIS settings that allow you to change it!

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