Tag: c
Nested repeater performance [Resolved]
by Jim Geurts on Mar.26, 2007, under Uncategorized
After failing to receive and answer in the newsgroups and forums, for my nested repeater performance issue, I contacted ScottGu directly. He didn’t seem sure of what was happening either, so he forwarded the info to a co-worker. Polita answered:
“The repeater calls databind on all its item children in the
ItemDataBound event. So the inner repeater is databound once by the
outer databound, and once by you in your Outer_ItemCreated event
handler. To make the inner repeater bind just once, remove the call to
DataBind in Outer_ItemCreated.”
So, it’s not a bug on the asp.net side of things… just in the way fuzzy logic flows through my brain. Either way, knowing this isn’t a bug and is easily remedied is a nice feeling… Thanks Scott and Polita for clearing this up!
xsd.exe fails with statements
by Jim Geurts on Mar.10, 2007, under Uncategorized
I wanted to generate some classes from two related schemas tonight, and unfortunately xsd.exe failed. It didn’t seem to recognize the <xsd:import> statement in the main xsd file. Apparently the schemaLocation attribute is considered a hint and is not in the spec. so… MS doesn’t recognize it. Anyway, in order to get xsd.exe to work properly, you just have to specify all of the files as parameters.
So instead of something like
xsd.exe MyParent.xsd /c
I had to use
xsd.exe MyChild.xsd MyParent.xsd /c
The type arguments for method cannot be inferred from the usage…
by Jim Geurts on Feb.15, 2007, under Uncategorized
I created a helper method to iterate a list of strongly typed objects. It was to be a simple method, that just returning a property of the objects with a separator character between each. The method signature looked like the following:
public static string FormatMyList<T>(List<T> list, string separator)
{ … }
What I had overlooked, though, was that the property I was passing was only an IList object (due to being a property used with nHibernate). So, I received an error message similar to the following: Compiler Error Message: CS0411:
The type arguments for method ‘TextFormatUtil.FormatMyList<T>(System.Collections.Generic.List<T>)’
cannot be inferred from the usage. Try specifying the type arguments
explicitly.
After correcting the method signature to use an IList, everything was fine…