NetTiers works fantastic out of the box using querystrings. Eg:
<data:AspnetUsersDataSource ID="AspnetUsersDataSource" runat="server" SelectMethod="GetByUserId">
<Parameters&开发者_JS百科gt;
<asp:QueryStringParameter Name="UserId" QueryStringField="UserId" Type="String" />
</Parameters>
</data:AspnetUsersDataSource>
However, if I try to change the parameter to instead be:
<asp:RouteParameter Name="UserId" RouteKey="id" Type="String" />
It just see empty textboxes when navigating to my AspnetUsersEdit.aspx page via the routed url:
user/edit/id
My hunch is this isn't a url routing problem but is instead something I'm missing with how NetTiers fundamentally works. If anyone has successfully used url routing within NetTiers, I'd greatly appreciate any input!
I was able to solve my problem by using FormViews (a slight pain, but good enough for me). One important note that took me some time to solve - NetTiers generated the solution such that periods were contained in the virtual path of the project. Unfortunately this caused havoc with routing when testing locally. Altering the virtual path so as to not contain periods fixed things for me.
精彩评论