Click here to Skip to main content
15,922,145 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: All Web controls must be placed within a <form runat="server"> tag to function properly. Pin
Pradipta Basu6-Feb-07 8:21
Pradipta Basu6-Feb-07 8:21 
AnswerRe: All Web controls must be placed within a <form runat="server"> tag to function properly. Pin
Guffa6-Feb-07 10:00
Guffa6-Feb-07 10:00 
QuestionHow to Use ajax control toolkit with asp.net1.1 Pin
suriee6-Feb-07 7:11
suriee6-Feb-07 7:11 
AnswerRe: How to Use ajax control toolkit with asp.net1.1 Pin
Christian Graus6-Feb-07 13:36
protectorChristian Graus6-Feb-07 13:36 
GeneralRe: How to Use ajax control toolkit with asp.net1.1 Pin
suriee7-Feb-07 0:09
suriee7-Feb-07 0:09 
GeneralRe: How to Use ajax control toolkit with asp.net1.1 Pin
Christian Graus7-Feb-07 9:24
protectorChristian Graus7-Feb-07 9:24 
QuestionHTML, VBScript, and Registry Reading Pin
drew.perkins6-Feb-07 6:23
drew.perkins6-Feb-07 6:23 
QuestionResponse.Cache.AddValidationCallback - incorrect behaviour??? Pin
egor5986-Feb-07 5:59
egor5986-Feb-07 5:59 
Greetings to you!

I think I've found a bug but not sure. So would like to hear your opinion on this issue.
It happens when I try to use Response.Cache.AddValicationCallback method in ASP.NET 2.0.

It seems that when using HttpValidationStatus.IgnoreThisRequest option the cached page is actually invalidated

and the most recent version is cached. Not sure if it's a bug or the intended behaviour in ASP.NET 2.0.

As written in MSDN documentation for the IgnoreThisRequest option (HttpValidationStatus enum):

"IgnoreThisRequest - Indicates that the request is treated as a cache miss and the page is executed. The cache is not invalidated. "

To try this I used simple test.aspx page with the following directive

<%@ outputcache duration="1200" location="server" varybyparam="none" %>

the page itself has a current time code only :
current time is: <%= DateTime.Now %>



in the code-behind file I have implemented validaton callback:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Caching;

public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.AddValidationCallback(new HttpCacheValidateHandler(DoCallback), null);
}
public static void DoCallback(HttpContext context, object data, ref HttpValidationStatus status)
{
if (context.Request.QueryString["d"] == "true")
status = HttpValidationStatus.IgnoreThisRequest;
else
status = HttpValidationStatus.Valid;
}
}I hit the page a couple of times to make sure it is cached, then I add querystring parameter "?d=true" and it all seems fine so far, every time fresh page is executed.

But then, when I remove querystring parameter and hit the page, not the previously cached page but the page with the most recent time is displayed and cached as well.

Do you think it's correct??? What's your opinion on this?
QuestionA data source instance has not been supplied for the data source 'DataSetAUDITLOG_CountLessons' Pin
Sarfaraj Ahmed6-Feb-07 5:37
Sarfaraj Ahmed6-Feb-07 5:37 
QuestionHow to use drop down list in details view? Pin
Alex Ru6-Feb-07 5:23
Alex Ru6-Feb-07 5:23 
AnswerRe: How to use drop down list in details view? Pin
Murthy Puvvada6-Feb-07 15:05
Murthy Puvvada6-Feb-07 15:05 
GeneralRe: How to use drop down list in details view? Pin
Alex Ru27-Apr-07 5:53
Alex Ru27-Apr-07 5:53 
GeneralRe: How to use drop down list in details view? Pin
Murthy Puvvada27-Apr-07 12:42
Murthy Puvvada27-Apr-07 12:42 
GeneralRe: How to use drop down list in details view? [modified] Pin
Alex Ru11-May-07 3:25
Alex Ru11-May-07 3:25 
QuestionSubmit Button problem when the iser presses enter Pin
nour1236-Feb-07 4:23
nour1236-Feb-07 4:23 
AnswerRe: Submit Button problem when the iser presses enter Pin
Blue_Boy6-Feb-07 4:37
Blue_Boy6-Feb-07 4:37 
AnswerRe: Submit Button problem when the iser presses enter Pin
Rookie6-Feb-07 7:29
Rookie6-Feb-07 7:29 
GeneralRe: Submit Button problem when the iser presses enter Pin
nour1236-Feb-07 12:04
nour1236-Feb-07 12:04 
GeneralRe: Submit Button problem when the iser presses enter Pin
nour1237-Feb-07 5:43
nour1237-Feb-07 5:43 
GeneralRe: Submit Button problem when the iser presses enter Pin
nour1237-Feb-07 5:56
nour1237-Feb-07 5:56 
AnswerRe: Submit Button problem when the iser presses enter Pin
Marcus J. Smith6-Feb-07 13:47
professionalMarcus J. Smith6-Feb-07 13:47 
GeneralRe: Submit Button problem when the iser presses enter Pin
nour1236-Feb-07 19:04
nour1236-Feb-07 19:04 
AnswerRe: Submit Button problem when the iser presses enter Pin
Vsree6-Feb-07 18:48
Vsree6-Feb-07 18:48 
AnswerRe: Submit Button problem when the iser presses enter Pin
Suresh Pirsquare7-Feb-07 4:45
Suresh Pirsquare7-Feb-07 4:45 
QuestionMaster Page Pin
nour1236-Feb-07 4:18
nour1236-Feb-07 4:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.