Andrew Stevenson's WebLog

Write Here Write Now

Syndication

.Net Languages

ADO.Net

Asp.Net (Misc.)

Asp.Net Controls

Bad Patterns

Err What?

Files and Folders

Forums

IE Add-Ins

Methods for the Madness

Performance

See Clearer, C#

Test Driven

Commerce Server 2007 SP2 now available !

Just in case you don't already have 3 links to it, here is a link.

https://blogs.msdn.com/tschultz/archive/2008/05/28/commerce-server-2007-sp2-now-available.aspx

 http://www.microsoft.com/downloads/Browse.aspx?DisplayLang=en&nr=20&productId=1D25BFD4-FAE9-4E08-BF77-60FB266BEE44&sortCriteria=date#

 

Posted Thursday, May 29, 2008 9:08 AM by AndrewSeven | with no comments

NUnitAsp and style="display: none"

I have a control, which I test with a customvalidatortester, that produces an html span with (I thought) style="display:none" and it was failing the test for visible==false.

A closer inspection showed that there was a space after the colon:   style="display: none"

Removing the space fixes the problem, but the root of the problem is where the space comes from. The space is inserted when I use Visual Studio 2005's format document on the aspx markup.

To solve this, I mad another small change to NUnitAsp.

In ValidatorTester, I chanbed the visible property to check for both versions.

                bool displayNone = (style != null && (style.IndexOf("display:none") != -1 || style.IndexOf("display: none") != -1));

 

Posted Wednesday, February 13, 2008 11:32 AM by AndrewSeven | with no comments

NUnitAsp and WebForm_PostBackOptions

I've decide to use NUnitAsp on the current project.

After doing some basic visibility checks I tried to call Click() on a LinkButtonTester and I got an error.

I did some digging and found that the new WebForm_PostBackOptions was not being recognized as a postback.

With a bit of hacking around, I've got it working again, the biggest issue was different quotes in the postBackScript from those in the html.

 

The fix:I'm not sure how comprehensive it is, but the basic fix is 2 changes in WebFormTester:

public bool IsPostBack(string candidatePostBackScript)

{

bool postback = (candidatePostBackScript.IndexOf("__doPostBack") != -1)

|| (candidatePostBackScript.IndexOf("WebForm_PostBackOptions") != -1);

return (candidatePostBackScript != null) && postback ;

}

and

public void PostBack(string postBackScript)

{

string postBackPattern1 = @"__doPostBack\('(?<target>.*?)','(?<argument>.*?)'\)";

string postBackPattern2 = @"__doPostBack\(\\'(?<target>.*?)\\',\\'(?<argument>.*?)\\'\)";

string postBackPattern3 = @"WebForm_PostBackOptions\(""(?<target>.*?)"", ""(?<argument>.*?)""";

 

bool succeeded = TryPostBack(postBackScript, postBackPattern1);

if (!succeeded) succeeded = TryPostBack(postBackScript, postBackPattern2);

if (!succeeded) succeeded = TryPostBack(postBackScript, postBackPattern3);

//if (!succeeded) succeeded = TryPostBack(postBackScript, postBackPattern4);

if (!succeeded)

{

throw new ParseException("'" + postBackScript + "' doesn't match expected patterns for postback in " + Description);

}

}

 

Posted Wednesday, January 30, 2008 1:39 PM by AndrewSeven | with no comments

Filed under: , ,

A shortcut to TFS Explorer

I find the number of clicks it takes to get to the Team Explorer a little long so I dug up this shortcut so that I can put it on a toolbar button.

Customize your toolbars, select "View" from the available categories, then scroll down to the commands that start with T and you will find TfsSourceControlExplorer.

Drag that puppy onto your favorite toolbar.

-A 

 

 

 

 

Posted Monday, November 05, 2007 9:45 AM by AndrewSeven | 2 comment(s)

Why is GMail better about spam than hotmail.

 I have accounts on both services and I can tell that lots of spam gets sent to each account.

The big difference seems to be that most spam sent to gmail is delivered directly to the spam folder where at least half of the spam in hotmail goes to the inbox.

 

 

 

 

Posted Tuesday, October 02, 2007 2:47 PM by AndrewSeven | with no comments

Filed under: , , ,

IE6 UI , Vista and Firefox

I'm looking for a browser that will run on Vista and give me the same UI that I had with IE6. 

At the moment, I'm using Firefox, it isn't my favorite, but I find the UI to be better than IE7.

I've tried some registry hacks for IE7 but now I'm ready to try other things ( I'm addicted to the Google Toolbar's search this site option so that might limit my options)

 
 
-A

 

A little footnote : I still have IE 6 on one machine at home (the main web browsing machine) and the main page of this site doesn't display very well.

 

 

Posted Tuesday, September 18, 2007 1:54 PM by AndrewSeven | 10 comment(s)

Understanding and solving the JavaScript/CSS entanglement phenomenon... deep web UI

A friend of mine who is a web UI specialist just put up an article about the complexities (and a fix) of showing and hiding parts of the UI when there is mix of css and javascript and javascript is disabled.

I prefer to leave these subtleties to him, but I think there may be some people here who would like the solution.

http://arapehlivanian.com/2007/02/14/understanding-and-solving-the-javascriptcss-entanglement-phenomenon/ 

 

Posted Thursday, February 15, 2007 3:59 PM by AndrewSeven | with no comments

Filed under:

CruiseControl.Net with MsBuild is giving me some strange behavior.

I've used CCNet in previous projects with nAnt to launch the build and I can't remember having any issues like the ones I have now.
It worked very smoothly.

In the project I am in now:
 -I use the msbuild and the msbuil task instead of nAnt.
 -The task is configured to use the the ThoughtWorks..XmlLogger. 
 -The build server running CC is a 64bit VMWare system.

 

I'm experiencing some reliability issues with this; frequent "Failure" and "Exception" results from builds. Sometimes a Force Build will fix the issue, but usually I need to restart the CCNet service. Sometimes I even need to reboot the CC server.

The most common "Exception" I've seen is an "attempt to read or write protected memory".
Other times, the status is just "Failure" and looking at the build log shows what seems to be a successful build :S

I'm not sure what to suspect as the source of the problem.
Is there anyone else using this same combination (on a virtual x64)?

If I could find a forum dedicated to CCNet, I'd post there...


Thanks for any suggestions about how to figure this out.

-Andrew

 

Posted Friday, September 29, 2006 12:53 PM by AndrewSeven | 1 comment(s)

Filed under: ,

Who decides "off topic"?

I'm wondering who decides that a post is off topic.

I wrote my first blog entry in a long time today was confused when it didn't show up on the main site.

After trying to figure out if I had not published it properly or set some specifc property, I eventualy noticed the two links for On Topic Only and All Posts.

I don't need the entry to show up on the main page, but it doesn't seem to be further off target than some of the other things that are in the main feed.

Edit : I think I figured it out, use the "Asp.Net" tag :P

 

Posted Thursday, August 10, 2006 4:57 PM by AndrewSeven | 3 comment(s)

Filed under: ,

Deleting the diagramming objects from Sql Server

Maybe there is a more direct way to do it, but the scripts below will delete the objects that are created for database diagrams.

I delete then because when I have no diagrams in the db and when I run Scriptio, it includes them in the script. They are marked as system objects, so the "delete" option does not appear in the Sql 2005 Management UI.

Note that this does delete any diagrams you might have in your db.

DROP PROCEDURE dbo.sp_alterdiagram
DROP PROCEDURE dbo.sp_creatediagram
DROP PROCEDURE dbo.sp_dropdiagram
DROP PROCEDURE dbo.sp_helpdiagramdefinition
DROP PROCEDURE dbo.sp_renamediagram
DROP PROCEDURE dbo.sp_upgraddiagrams
DROP PROCEDURE dbo.sp_helpdiagrams
DROP FUNCTION dbo.fn_diagramobjects
DROP TABLE dbo.sysdiagrams

Posted Thursday, August 10, 2006 9:49 AM by AndrewSeven | with no comments

Filed under: ,

More Posts Next page »