Upon further research, which was tedious as there isn't a lot of the actual EntityDataSource control since all us probably do most of our EF work in the code behind, there were three issues
- I did not have a where attribute in the EDS markup
- The "Type" in the WhereParameter needs to be DBType
- The Name Attribute of the WhereParameter much match the variable in the Where statement in the EDS markup
Here is the code that works:
<asp:UpdatePanel ID="updtEditContact" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlContacttoEdit" runat="server" CssClass="dropdowns"
AutoPostBack="True" ClientIDMode="Static"/>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="rblAddEditContact" EventName="SelectedIndexChanged"/>
</Triggers>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="updatEditContactDetail" runat="server">
<ContentTemplate>
<asp:DetailsView ID="dvEditContacts" runat="server" Height="50px" Width="300px"
DataSourceID="edsSelectedContact" DataKeyNames="Id" Visible="False"
CssClass="mDetail" FieldHeaderStyle-CssClass="fieldheader"
ItemStyle-CssClass="itemvalues" CommandRowStyle-CssClass="cmdRow"
EditRowStyle-CssClass="editvalues" ClientIDMode="Static"
InsertRowStyle-CssClass="insertvalues" RowStyle-CssClass="rowvalues"/>
<asp:EntityDataSource ID="edsSelectedContact" runat="server" ConnectionString="name=webEntities"
DefaultContainerName="webEntities" EnableFlattening="False"
EntitySetName="contacts" Where="it.Id = @ID">
<WhereParameters>
<asp:ControlParameter ControlID="ddlContactToEdit" Name="ID" PropertyName="SelectedValue" DbType="Int32"/>
</WhereParameters>
</asp:EntityDataSource>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlContacttoEdit" EventName="SelectedIndexChanged"/>
</Triggers>
</asp:UpdatePanel>