Have a look here - ASP.net URL rewrite based off query string ID
I think your scenario can be handled using page routing.
Question
We are using and update panel with a repeater inside on url "/casestudy/":
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="LoadMore" />
</Triggers>
<ContentTemplate>
<div class="row">
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<%# Eval("Title") %>
</ItemTemplate>
</asp:Repeater>
</div>
<div class="row center">
<asp:Button runat="server" ClientIDMode="Static" OnClientClick="$(this).hide();" OnClick="Unnamed_Click" ID="LoadMore" Text="VIEW MORE" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
We also rewrite the url "location/case-study" to this same page using this outbound rule:
<rule name="test" preCondition="IsHTML" enabled="true" patternSyntax="ECMAScript" stopProcessing="false">
<match filterByTags="A" pattern="(.*)" negate="false" />
<action type="Rewrite" value="/{C:1}{R:0}" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{R:0}" pattern="(location|this|that)" negate="true" />
<add input="{URL}" negate="true" pattern="\.axd$" /> <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</conditions>
</rule>
<preConditions>
<preCondition name="IsHTML">
<add input="{URL}" negate="true" pattern="\.axd$" />
</preCondition>
</preConditions>
The repeater works great when the outbound rewrite is not applied but we receive "Viewstate verification failed. Reason: The viewstate supplied failed integrity check" on the page after the outbound rule is applied.
I have tried restricting axd files from the outbound rule, setting enableviewstatemac to false, changing the form action and setting the machine key. What am I missing? I read that the out bound rules are not applied to updatepanel content, but if so how do I fix?
I appreciate anyone's help and suggestions.
No correct solution
OTHER TIPS
Have a look here - ASP.net URL rewrite based off query string ID
I think your scenario can be handled using page routing.