Posted by david on 22. January 2009 22:02
this came out surprisingly good. I had picked up a couple of albacore steaks from Trader Joes a few days ago … cheap! & hefty.
Found this recipe in Bittman, Minimalist
3 tbs olive oil
3 large or 4-5 medium onions, thinly sliced
1 large thyme sprig
2 medium tomatoes
1 1/2 - 2 lbs tuna or swordfish
~1/2 c roughly chopped good black olives
1) OO in 10-12” skillet on medium. Add onions, healthy pinch of salt, the tyme. Cook, stirring occasionally, until begins to sizzle ~ 1-2 min. Then adjust to low, so you only have to stir every 5 min 2 keep onions from browning. Do not allow them to brown. Cook at least 30 min.
2) Core & seed tomatoes. 1/2 in. dice. Get yer grill going.
3) when onions are very soft, almost shapeless, season fish with s&p, grill it, turning once. for total of 6min for tuna, 8 for swordfish.
4) while fish is griling, add tomatoes & olives to onions & raise heat; cook, stirring occasionally, until tomatoes begin to liquify. season.
5) Serve fish on a bed of the onion comfit.
I used a creuset grill, well oiled & slathered my fish in mayo first. I also used 3 sprigs of thyme in the the comfit, which was nice & fragrant.
Also drizzled melted butter on the fish after plating.
It was damn tasty for the maybe $5 for the fish & the price of the onions. The grill marks came out real nice on the fish, too.
Comments: 5
Filed Under:
Tags:
food,
fish
Posted by david on 21. January 2009 21:52
a hanselminutes podcast on testability
I listen to these sorta podcasts – the high priests of software development – I get about a quarter of it – but hopefully some of it gets through – it’s sometimes feels like listening to lectures on quantum physics … without out any educational preparation. Maybe, though, it keeps me aware that there is is a big, huge, complex world out there. Which, itself, is comforting.
Posted by david on 21. January 2009 09:11
target is this: Precise Geocoding with MapPoint Web Service and Virtual Earth … I got a little lost with the web config setup, so I am also referencing this.Reflect() & this MSDN Step 1 Set Up the Project for the Federated Search Virtual Earth Map Connector [Search Server 20
“The code also uses the <appSettings> section of the application's Web.config file to locate the user ID and password for the MapPoint Web Service. To use this code in your application, you'll need to add an <appSettings> element to your Web.config file. Here's a sample:
<appSettings> <add key="MPUser" value="UserID" /> <add key="MPPass" value="Password" /></appSettings>
You would need to replace the values with the user ID and password that you received from Microsoft when you signed up for your evaluation account.” ( source )
That seemed to work … got the web reference added, the user info in to webconfig, and updating the web reference did not error out. More...
Posted by david on 20. January 2009 21:00
Hanselminutes
How to get latitude and longitude from a postal address Virtual Earth Map Control Development Wi
There is a demonstration of a “find & add results to layer” in the iSDK under Find Information, Add Results
I am worried about whether it will take too much time to have the map do it …
I remembered, then, that SQL 08 has geometry data type & new functions to go with it … maybe I could then bulk process a list of addresses on my local db.
MapPoint Batch Geocoder - Home
GeocodeServiceClient.Geocode Method
well, looks like geocoding is not an available function. The same outcome is possible using a Mappoint Service:
Virtual Earth & SQL Server 2008 - Part 4 Integrating SQL Server 2008 and Virtual Earth (1-6) – W
or using the Yahoo geocode service:
Yahoo Geocode, SQL Server 2008 and ASP.NET AJAX
& I am pretty sure there is a google one too.
Posted by david on 19. January 2009 21:56
LinqDataSource error:
Operator '==' incompatible with operand types 'Int32?' and 'Object'
This occurred between two grid views.
This fantastic blog details common exceptions of LinqDataSource and indicates that my problem is that on page load the parameter for the dependent gridview is null.
Posted by david on 19. January 2009 20:30
{
Literal1.Text = GridView1.SelectedIndex.ToString();
GridView1.SelectedRow.BackColor = System.Drawing.Color.CadetBlue;
selected row in a gridview
Still haven’t got my Selected Row to change, but found a cool mouseover snippet that works just fine:
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='Silver'");
// This will be the back ground color of the GridView Control
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='White'");
}
}
I deleted everything from the page. Add back the gridview into the POI_Panel. No update panel yet. My selected row is still not working. so the ajax is not the problem. Right now, I’ve got the gridview inside of a panel. The Panel size limits the gridview row count, providing the scrolling action.
simpler multiselect .. all c#
multi-row-selection-in-gridview
very nice, check anywhere in the row, check all rows, etc. But is mainly javascript.
WEBSWAPP Development Inc
Ok – this works, mostly. This is an gridview, nested in an updatepanel, nested in a regular panel. The outside panel is sized & is limiting the gridview. however, it’s a little ugly with the rows not being distinct. & I’ve yet to check selection.
<asp:Panel ID="POI_Panel" runat="server" Height="300px" Width="350px"
ScrollBars="Vertical">
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="mapsiteLinqToSQLDataContext" Select="new (POI_Name, POI_ID)"
TableName="POIs">
</asp:LinqDataSource>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" DataSourceID="LinqDataSource1">
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
another multiselect gridview solution …
It Could Be Done! GridView with Multiple Rows Selected, Controls in the Template Column and Edit
CodeProject Extending GridView by allowing Multiple Selections and Multi Column Sort. Free sourc
& another – this one is thorough & from MSDN magazine:
Cutting Edge Extending the GridView Control
from Deleting Multiple Rows in a GridView DX Blog : this is to iterate through the list, and do something on each item which is checked.
In Code behind file (.cs) for C# and (.vb) for VB.NET, code the button click event. Our code will first loop through all the rows in the GridView. If a row is checked, the code retrieves the EmployeeID and passes the selected value to the Delete Command.
C#
protected void btnMultipleRowDelete_Click(object sender, EventArgs e)
{
// Looping through all the rows in the GridView
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox checkbox = (CheckBox)row.FindControl(“cbRows”);
//Check if the checkbox is checked.
//value in the HtmlInputCheckBox’s Value property is set as the //value of the delete command’s parameter.
if (checkbox.Checked)
{
// Retreive the Employee ID
int employeeID = Convert.ToInt32(GridView1.DataKeys[row.RowIndex].Value);
// Pass the value of the selected Employye ID to the Delete //command.
SqlDataSource1.DeleteParameters["EmployeeID"].DefaultValue = employeeID.ToString();
SqlDataSource1.Delete();
}
}
}
OK back to basics: the gridview, by itself, has a selected row property. One row. These other methods add checkboxes to let you define the selection outside of the gridview.
I’m gonna back out of this for now, build up a set of cascading simple lists to get the data displaying on the page. multi select can come in round two or three … maybe a little easier after this other work.
Posted by david on 19. January 2009 00:04
got a gridview on page … having trouble limiting number of rows on it. Limiting the height of the gridview control didn’t help. I interpreted the documentation to mean that scrollbars would appear if the data could not fit into the control. Didn’t work.
Nesting the gridview in an update panel didn’t help – there were no height properties to access.
nesting all the above in a named div & setting the height in CSS also didn’t help …
then with all these structures built, I tried setting the height of the gridviee … didn’t help
ok
reading back over gridviews in MacDonald
“Tip: Want to create a GridView that scrolls – inside a web page? It’s easy. [ LOL ] Just place the gridView inside a Panel control, set the appropriate size for the panel, and set the Panel.Scrollbars property to Auto, Vertical, or Both.” (MacDonald, p.584)
I swear I’ve tried this already & found that there are no size properties accessible in the properties window in designer mode. So, BOL Panel.ScrollBars Property, sez:
<asp:Panel ID="Panel1" runat="Server"
Height="300px" Width="400px"
BackColor="Aqua" ScrollBars="Auto">
I change my front code to
<asp:UpdatePanel ID="panelPOI" runat="server" UpdateMode="Conditional"
Height="200px" Width="400px"
ScrollBars="Auto">
Save & Open …
Failed: Type 'System.Web.UI.UpdatePanel' does not have a public property named 'Height'.
ah shite, I just realized that I am trying to change the stuff in an UpdatePanel, the BOL code refers to a plain jane panel.
redo – not the code looks like:
<asp:UpdatePanel ID="panelPOI" runat="server" UpdateMode="Conditional">
<asp:Panel ID="Panel1" runat="server" Height="200px" Width="300px" ScrollBars="Auto">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="LinqDataSource1" Height="100px">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="POI_Name" HeaderText="POI_Name" ReadOnly="True"
SortExpression="POI_Name" />
<asp:BoundField DataField="POI_ID" HeaderText="POI_ID" ReadOnly="True"
SortExpression="POI_ID" />
</Columns>
</asp:GridView>
</asp:Panel>
</ContentTemplate>
</asp:Panel>
</asp:UpdatePanel>
which I think is starting to get a little ridiculous.
Failed: Type 'System.Web.UI.UpdatePanel' does not have a public property named 'Panel'.
I suspect the problem is in all of this crazy nesting. Strip out all the UpdatePanel stuff to this:
<asp:Panel ID="Panel1" runat="server" Height="200px" Width="300px" ScrollBars="Auto">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="LinqDataSource1" Height="100px">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="POI_Name" HeaderText="POI_Name" ReadOnly="True"
SortExpression="POI_Name" />
<asp:BoundField DataField="POI_ID" HeaderText="POI_ID" ReadOnly="True"
SortExpression="POI_ID" />
</Columns>
</asp:GridView>
</asp:Panel>
Worked: I get a well-behaved gridview of about 10 rows; great; now how to make it all ajaxy again - because hitting select on any of the rows causes a full refresh. now that I’ve got the grid itself working nicely, how can I get a behaving updatepanel?
Drag an updatepanel to designer.
Copy the working Panel into it, what happens?
not gonna like it, didn’t like it.
Found another line at this problem here, probably a solution to a problem I will have down the road, but for now I see that Mr.Jana has a div inside of the updatepanel:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="divGrid" style="overflow: auto; height: 130px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
I implement it like so:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="divGrid" style="overflow: auto; height: 130px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="LinqDataSource1" Height="100px">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="POI_Name" HeaderText="POI_Name" ReadOnly="True"
SortExpression="POI_Name" />
<asp:BoundField DataField="POI_ID" HeaderText="POI_ID" ReadOnly="True"
SortExpression="POI_ID" />
</Columns>
</asp:GridView>
</div>
</ContentTemplate>
</asp:UpdatePanel>
& this almost works:
The data list is limited, But no scrollbars. Going back into the style code, there is no property for scrolling. The answer isn’t apparent.
I remember running across a technique of getting controls to update without having them inside of the update panels. I might be able to use the plain panel and then link that panel to an update panel or the script manager.
Back to MacDonald, p.870: addressing a similar problem:
“The solution is to explicitly tell the UpdatePanel to monitor those controls, even though they aren’t inside the UpdatePanel. You can do this by adding triggers to the UpdatePanel. You add one trigger for each button.”
This looked good for a sec … thing is that the Panel is not exposing the scroll event to serve as a trigger. & the GridView inside the Panel doesn’t appear to have anything to offer, either.
There is a RowCommand in the GridView “fires when an event is generated within the GridView”
& Happy MLK Day, it worked … so far. I’ve got a limited list, with a scroll bar, no postback, hitting select does not postback …. course it’s not actually doing anything, so I might still have some troubles ahead.
<asp:Panel ID="POI_Panel" runat="server" Height="200px" Width="300px"
ScrollBars="Vertical">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="LinqDataSource1" Height="100px">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="POI_Name" HeaderText="POI_Name" ReadOnly="True"
SortExpression="POI_Name" />
<asp:BoundField DataField="POI_ID" HeaderText="POI_ID" ReadOnly="True"
SortExpression="POI_ID" />
</Columns>
</asp:GridView>
</asp:Panel>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="GridView1" EventName="RowCommand">
</asp:AsyncPostBackTrigger>
</Triggers>
p:UpdatePanel>
Oh – I did not create a trigger for the Select event in the UpdatePanel.
http://looksgoodworkswell.blogspot.com/2005/06/death-to-paging-rico-livegrid-released.html
ah still not working well … selected index change is not firing.
Posted by david on 18. January 2009 21:52
ASP.NET AJAX Control Toolkit live samples
CascadingDropDown Sample
Posted by david on 18. January 2009 21:47
I had to reinstall windows a couple weeks ago … didn’t notice till now but I lost my set of ajax controls when I reinstalled VS ‘08.
This happened before. There is some security hitch that keeps one from loading the toolbox. The work around is described in that note … but, there is another catch. It depends on one having the .net 2.0 configuration applet in Control Panel / Administrative Tools. I didn’t have that. Some weirdness with Server 2008. i resolved it before, but I think I just got lucky.
So, download the SDK.
Install & can now see the adjust zone security tab now.
Choose Items For Toolbox
failed: “there was an error loading types from assembly ….. Request for permission of type System.Web.AspNetHostingPermission “
I hadn’t yet loaded up the page … will try that & see if it makes a difference.
failed: same error
do a reboot. download the dll only zip from codeplex. delete old tool tab. add tab. Choose items. added that dll.
work. but still just feels like luck.
Posted by david on 17. January 2009 20:14
David Allen does an hour or so podcast summing up the whole GTD thing … in advance of his new book.
David Allen - Making It All Work