I probably need to reinstall the whole machine and put 2005 instead :P
I've been having this strange behavior in the 2003 debugger:
All my integers are displayed as hex (mouse over and watch window) which is fine for small values like 1 and 2, but I don't have instant hex translation for 0x71.
Did I flip some little switch somewhere? I've been hexed
I'm looking at approaches that leverage Asp.Net's databinding abilities as an alternative to some object structures that serve almost only for "ease of" data binding.
I had made this happen before, probably with a typo, but had been unable to reproduce it.
I was trying this seemingly logical progression to bind a field that is deep inside:
<%#DataBinder.Eval(Container.DataItem,"ProductProperties")%> Gives DataSet
<%#DataBinder.Eval(Container.DataItem,"ProductProperties.Tables[0].Rows[0]")%> Gives DataRow
<%#DataBinder.Eval(Container.DataItem,"ProductProperties.Tables[0].Rows[0]['Description']")%> Still gives DataRow !? Nice quotes eh?
<%#DataBinder.Eval(Container.DataItem,"ProductProperties.Tables[0].Rows[0][0]")%> Still gives data row.
What gives? ;) I try a the ItemArray
<%#DataBinder.Eval(Container.DataItem,"ProductProperties.Tables[0].Rows[0].ItemArray[0]")%> Gives me the value. So something works, but I don't want to use indexes, the order will change.
<%#DataBinder.Eval(Container.DataItem,"ProductProperties.Tables[0].Rows[0].Item[0]")%> Wishfull thinking, not a property, compile error.
<%#DataBinder.Eval(Container.DataItem,"ProductProperties.Tables[0].Rows[0].[0]")%> Look at that dot! Bad dot, Good dot. It works
The final functional version:
<%#DataBinder.Eval(Container.DataItem,"ProductProperties.Tables[0].Rows[0].['Description']")%>
I guess that the databinder gets confused by the indexer, the extra dot seems to be the hint it needs to realize that the is annother level to look at.