July 2004 - Posts
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.
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
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
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
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.
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)
Give me six hours to chop down a tree and I will spend the first four sharpening the axe.
-Abraham Lincoln
More Posts