Question about redirecting user based on the input
I am working on an ASP.NET 3.5 web application where I need to redirect the user based in certain condition. I am currently checking the path and if it contains appropriate page say "TestPage.aspx" then generating the path using string.Format method. The code is somewhat below
Can I apply any pattern here so that there are less if-else condition and hard coding of the pages while comparison is removed?
Any help with this regard will be greatly appreciated.
Harshad Riswadkar, Sep 20, 2010