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

July 2004 - Posts

Searching for image upload control for asp.net

Sorry to hit the main thread with this, but I saw a really nice control for managing and uploading multiple images in asp.net apps.

It poped up a new window and even had a kind of preview option.

It was posted on the main feed, but I can't find it anymore.

Thanks for you patience.

 

Posted Friday, July 30, 2004 11:07 AM by AndrewSeven | 2 comment(s)

Good, bad or just a bit ugly : string[] RemoveEmpties(string[] source)

I'm building up a bunch of conditions for an SqlWhereClause and there is an option to AND the various condition or to OR them.

I have a few function to build the conditions, but when I get around to putting them all together some of them are blank so when I String.Join them I get extra ANDs/ORs in my final statement.

This eventualy led me to the RemoveEmpties function, which takes a array of strings and returns an array that contains only the non-null non-empty ones.

 

private string JoinSQLFragments(string joiner,params string[] fragments)

            {

                  return String.Join(joiner,RemoveEmpties(fragments));

            }

            private string[] RemoveEmpties(string[] source)

            {

                  ArrayList list = new ArrayList(); // :(

                  foreach(string item in source)

                  {

                        if(item!=null && item.Length > 0)

                        {

                              list.Add(item);

                        }

                  }

                  return (string[]) list.ToArray(typeof(string));

            }

I call these from something like the following, each of the BuildX methods can return a blank string.

JoinSQLFragments(" OR ",BuildMonthRangeCriteria("FieldA",criteriaA),BuildKeywordCriteria(keyword));

Any helpful thoughts or beauty tips ;) will be appreciated

Posted Wednesday, July 28, 2004 9:19 AM by AndrewSeven | 5 comment(s)

MSIB UrlBuilder ignores Commerce Server's PutTicketInURL option

Hi,

We are hoping to use the commerce server put ticket in url option in an MSIB solution so that we can profile users who refuse cookies.

Are we dreaming? Does anyone have some guidance, advice, scalding comments?

For stuff we can control like navigation, we have a controler that will use the CS url builder, but things like links in placeholders that point to other postings are really un-clear.

:(

Update: WTF.

I am using the UrlBuilder class from MSIB and it is not adding the MSCSProfile= to the url.

When I make the switch to the CS QueryStringBuilder, I get the value in the url as expected.

At the moment I am thinking that this class does not add any value. Am I missing something, some sort of configuration?

What is this class for if it it not adding to the functionality of the CS QueryStringBuilder?

How do I re-enable comments??? Comments here ... http://weblogs.asp.net/andrewseven/articles/230995.aspx

 

Posted Friday, July 23, 2004 12:08 PM by AndrewSeven | 2 comment(s)

To the creators of [name removed]

Your regular posting of your product pitch in  the forums is not really appreciated.
I think that by posting there, you are doing far more harm to your reputaion than you think.

eg: http://www.aspmessageboard.com/forum/ASPPlus.asp?M=716494&T=716494&F=36&P=1

A little edit to give them less face

 

Posted Friday, July 23, 2004 11:01 AM by AndrewSeven | 4 comment(s)

Resign Patterns : Ailments of Unsuitable Project-Disoriented Software

A friend sent me this link

Resign Patterns
Ailments of Unsuitable Project-Disoriented Software

He is stuck calling a COM object's method from C# and the method want a Scripting.Dictionary passed byRef, help me help him find the way out. 

 

Posted Tuesday, July 20, 2004 9:03 AM by AndrewSeven | with no comments

Visual Studio Feature Request (new?)

I had this idea last night and I haven't seen it mentioned before

I code almost exclusively in C# and I was trying to help someone with VB.Net code. Whenever this happens, I spend as much time trying to transliterate the VB as I do on the problem.

I am proposing that each of the IDEs (VB  & c#) have a “paste as” option that allows you to paste code in one language and have it converted to the other.

(Very low priority feature)

Posted Wednesday, July 14, 2004 4:00 PM by AndrewSeven | 4 comment(s)

Quote: Abraham Lincoln

Give me six hours to chop down a tree and I will spend the first four sharpening the axe.

-Abraham Lincoln

Posted Tuesday, July 13, 2004 9:34 AM by AndrewSeven | 1 comment(s)

More Posts