I have a page that is basically an account setup page where users can update their own info. So when the page loads I want to automatically populate the FormView with their information. I wasn't able to get the ProfileParameter to work for some reason. The user is definitely logged in as the page requires them to be to access the page at all. I have also confirmed that through debug watch function. Here's the problem I get with that.
<asp:SqlDataSource runat="server" ID="dsOrganization" ConnectionString="<%$ ConnectionStrings:ProBonoPro %>" OnSelecting="dsOrganization_OnSelecting"
SelectCommand="select * from pbp_organizations_v where UserId = @UserId">
<asp:ProfileParameter Name="UserId" PropertyName="UserId" />
Also tried using PropertyName="ProviderUserKey" - same result.
This gives me an error "System.Web.HttpException: DataBinding: 'ProfileCommon' does not contain a property with the name 'UserId'." It dies at the fvOrganization.DataBind() line below.
The other thing I tried was to add the parameter in the OnSelecting event, which gives me the error &
View Complete Post