I started receiving these errors a couple of weeks ago, very randomly, and always reporting a fault with ScriptResource.axd and a strange parameter being passed as "d" as a querystring to it.
After some reading around, I eventually came across the following thread that was dicussing the issue.
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=434997
The end of the thread, dated 12/10/09 states that this is a bug in IE8 that is hopefully going to be fixed soon, and that it doesn't affect the end users view of the site.
Friday, 16 October 2009
Monday, 29 June 2009
ASP.NET Ajax document.getElementById is null or not an object
This has taken me three days to figure out. For what seemed like absolutely no reason, my ajax enabled application just stopped working. I went back through all my changes to see what it could have possibly have been to make the application start throwing the javascript document.getElementById('') is null or not an object error, and specifically, why it was doing this on document.getElementById('HEAD[0]').
I eventually found a secton of html that I had commented out with html comments, and I had included in this an asp.net ajax tag.
Removing these comments fixed the problem!
I eventually found a secton of html that I had commented out with html comments, and I had included in this an asp.net ajax
Removing these comments fixed the problem!
Wednesday, 24 June 2009
SQL Server Cannot resolve collation conflict for equal to operation.
Today I migrated an exisiting set of tables from one database, to a new database, to isolate their work.
After copying all the stored procs, views, tables and data, one of my stored procs wouldn't run.
Everytime I tried to execute it, I got the error:
"Cannot resolve collation conflict for equal to operation."
It transpires that this error can be caused by many different problems, butt he main one being that the collation types for the columns being joined in the sql statement is different.
In my instance this was not the case, but by telling the columns to use the databases default collation on either side of the join fixed the problem - e.g.
SELECT table1.*, table2.* FROM table1
INNER JOIN table2 ON table1.column1 COLLATE DATABASE_DEFAULT = table2.column1 COLLATE DATABASE_DEFAULT
After copying all the stored procs, views, tables and data, one of my stored procs wouldn't run.
Everytime I tried to execute it, I got the error:
"Cannot resolve collation conflict for equal to operation."
It transpires that this error can be caused by many different problems, butt he main one being that the collation types for the columns being joined in the sql statement is different.
In my instance this was not the case, but by telling the columns to use the databases default collation on either side of the join fixed the problem - e.g.
SELECT table1.*, table2.* FROM table1
INNER JOIN table2 ON table1.column1 COLLATE DATABASE_DEFAULT = table2.column1 COLLATE DATABASE_DEFAULT
Thursday, 11 June 2009
CompareValidator doesn't fire
I have an application where I am using a CompareValidator on a field that is acting as a CAPTCHA, therefore I am comparing the value that is entered.
When testing the page, I was clicking the submit button on the form, before entering any text, but when I did this, it was submitting the form! Why, when the value couldn't possibly be the same?
The reason for it is the depths of the AJAX js files:
The following line is the culprit:
If the length of the information input into the box being validated is 0, i.e. nothing entered, then this validates as true. This means that if you compare something to nothing, that is valid.... stupid, but valid.
The solution to this is to add a RequiredFieldValidator as well, which then forces the length to be greater than 0, an thus makes it all work
When testing the page, I was clicking the submit button on the form, before entering any text, but when I did this, it was submitting the form! Why, when the value couldn't possibly be the same?
The reason for it is the depths of the AJAX js files:
function CompareValidatorEvaluateIsValid(val) {
var value = ValidatorGetValue(val.controltovalidate);
if (ValidatorTrim(value).length == 0)
return true;
var compareTo = "";
if ((typeof(val.controltocompare) != "string") ||
(typeof(document.getElementById(val.controltocompare)) == "undefined") ||
(null == document.getElementById(val.controltocompare))) {
if (typeof(val.valuetocompare) == "string") {
compareTo = val.valuetocompare;
}
}
else {
compareTo = ValidatorGetValue(val.controltocompare);
}
var operator = "Equal";
if (typeof(val.operator) == "string") {
operator = val.operator;
}
return ValidatorCompare(value, compareTo, operator, val);
}
The following line is the culprit:
if (ValidatorTrim(value).length == 0)
return true;
If the length of the information input into the box being validated is 0, i.e. nothing entered, then this validates as true. This means that if you compare something to nothing, that is valid.... stupid, but valid.
The solution to this is to add a RequiredFieldValidator as well, which then forces the length to be greater than 0, an thus makes it all work
Thursday, 4 June 2009
Compiler Error Message: CS0115: 'ASP.pagename_aspx.GetTypeHashCode()': no suitable method found to override
I came accross this problem today when converting a set of application pages into master pages.
My initial problem was that I had set CodeFile attribute of the @Page directive, rather than the CodeBehind attribute.
The second problem was that my page was inheriting from the Masterpage, rather than from System.Web.Ui.Page.
When I fixed these it worked.
It essence, if you get this error, check out what, and where your page is inheriting from.
My initial problem was that I had set CodeFile attribute of the @Page directive, rather than the CodeBehind attribute.
The second problem was that my page was inheriting from the Masterpage, rather than from System.Web.Ui.Page.
When I fixed these it worked.
It essence, if you get this error, check out what, and where your page is inheriting from.
Tuesday, 2 June 2009
Outlook 2007 Email Headers
I keep forgetting where to find this one....
When you wish to see the header, right click on the message in your inbox and choose "Message Options". The window that pops up has the headers showing in it.
When you wish to see the header, right click on the message in your inbox and choose "Message Options". The window that pops up has the headers showing in it.
Tuesday, 19 May 2009
TinyMCE ListBox Plugin for Merge Tags
Well, today I finally managed to cobble together the following solution for a problem I had whereby I wanted a plugin for TinyMCE whereby I could select a value from a drop down / listbox, and have it inserted into TinyMCE.
So here's how I did it:
First define a javascript array BEFORE initialising the TinyMCE editor. This allows you to create this array server side if you want (by writing a response stream declaring it if necessary), or allows you to control it per page. E.g:
I created a new plugin in tiny_mce/plugins/usertags/editor_plugin.js as follows:
This you can then register as a plugin in tinymce.
So here's how I did it:
First define a javascript array BEFORE initialising the TinyMCE editor. This allows you to create this array server side if you want (by writing a response stream declaring it if necessary), or allows you to control it per page. E.g:
var arrUserTags = new Array('{{Name}}','{{Address}}','{{Company}}');I created a new plugin in tiny_mce/plugins/usertags/editor_plugin.js as follows:
(function() {
tinymce.create('tinymce.plugins.usertags', {
init : function(ed, url) {
},
createControl: function(n, cm) {
switch (n) {
case 'usertags':
var mlb = cm.createListBox('usertags', {
title : 'Insert details ',
onselect : function(v) {
tinyMCE.activeEditor.selection.setContent(v);
}
});
//The array arrUserTags, must be defined before the editor is added!!! Or if you prefer, just ignore the array idea, and just do multiple mlb.add() statements.
for(i=0;iThis you can then register as a plugin in tinymce.
Subscribe to:
Posts (Atom)