Click here to Skip to main content
15,944,136 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
I am using url re-write in my asp.net application web.config file.But when i submit a form the query string value has to be duplicated.how can i avoid this
Url Rewrite Code:
HTML
<rewrite>
     <rules>
        <rule name="Rewrite to Activate.aspx">
         <match url="^activate/([0-9.a-z]+)" ignoreCase="true"  />
         <action type="Rewrite" url="/activate.aspx?id={R:1}" />
       </rule>
     </rules>
</rewrite>

When i submit the activate button i got the error
http://www.sample.com/activate.aspx?id=100&id=100. Error Message:Input string was not in a correct format.
Id got duplicated...
Please help me to solve this.
Posted
Updated 27-Nov-16 23:26pm
Comments
The_Inventor 31-Jul-13 3:25am    
Did you forget to set id={R:1} to

="^activate/([0-9.a-z]+)" ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900