Hi Friends.,
I Need to Rewrite URL of Web Site it Has Several Pages For All Pages i Need to Change or Hide the URL and its QueryString Values
For e.g: www.ebrdagdshssbd.com/Checking/Default.aspx/id=12345&Category=Test
I Need to Change Above URL into
www.ebrdagdshssbd.com/Checking/Default/12345/Test
or
www.ebrdagdshssbd.com
For All Pages
Please Give Correct and Clear Solution ASAP Friends , i'Ve Googled and Implemented Some Solutions in Web.Config Changes and IIS Also Then Also Am Not able Solve this Problem
Regards.,
R.V.Rajagopalan
Loading

Rajagopalan R VPosted Apr 6, 2015, 7:25 AM
i'Ve Used Encryption and Decryption Method now it's Working fine for me now
Let Me Use Your Code and Let U Know the Result Soon ASAP
Regards....,
R.V.Rajagopalan
Ankur JainPosted Apr 3, 2015, 7:16 AM
try like this..
first add Global.asax file then write below code
then from where your are sending values with query string change it to like this:
Response.Redirect(www.ebrdagdshssbd.com/Checking/Default/IDValue/NameValue);
eg:
www.ebrdagdshssbd.com/Checking/Default/12345/Test
then on your page get values like this:
if(!string.IsNullOrEmpty(this.Page.RouteData.Values["ID"].ToString()) && !string.IsNullOrEmpty(this.Page.RouteData.Values["Name"].ToString()))
{
string id=this.Page.RouteData.Values["ID"].ToString();
string name=this.Page.RouteData.Values["Name].ToString();
}
Rajagopalan R VPosted Apr 3, 2015, 7:02 AM
I'Ve Used the Below Code in Web.Config, Its Removing Extension (.aspx) and Removid Some Auto Generating Images in My Application so I Can't Use this
Please if u Get Any Solutions to Rewrite URL or to Remove Extensions reply Me ASAP
Regards....,
R.V.rajagopalan
Rajagopalan R VPosted Apr 2, 2015, 1:51 AM
I've Gone Through the Link Which u Posted Above
Am Not Clear About the First Link from Code Project
and in Second Link they Mention that we need to add following Code in Global.asax Page
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup RegisterRoute(System.Web.Routing.RouteTable.Routes);
}
void RegisterRoute(System.Web.Routing.RouteCollection routes)
{
routes.Add("Products", new System.Web.Routing.Route("Products/{category}", new CategoryRouteHandler()));
}
in Void RegisterRoute i Think we need to Add Path for each Folder and page
in that Practically in my case it's not Possible if u Can Please give Any other Suggestion
Rajeesh MenothPosted Apr 1, 2015, 9:32 AM
1) http://www.codeproject.com/Articles/641758/An-Example-of-URL-Rewriting-With-ASP-NET
2) https://code.msdn.microsoft.com/Easy-Steps-to-URL-2f792901