TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mayukh Sen
NA
48
447
Need help for redirecting pages from asp.net to MVC
Apr 20 2020 11:10 AM
We have a page https://www.giftstoindia24x7.com/Article.aspx which is built in Asp.Net and has a url with the .aspx extension https://www.giftstoindia24x7.com/articles/when-is-mothers-day-2020.aspx. We have started shifting our project to Asp.Net Mvc. and we need to transfer this url to https://www.giftstoindia24x7.com/a/when-is-mothers-day-2020 extension less url and Also the internally there will multiple pages in response to a .net request. I have tried the global.asax for this but not working. Can anyone help me with this?
private
void
Application_BeginRequest(
object
sender, EventArgs e)
{
string
fullOrigionalpath = Request.url.tostring();
string
NewUrl = getUrl(fullOrigionalpath);
Context.RewritePath(NewUrl);
}
And the getUrl method looks like
private
string
getUrl(
string
inputUrl)
{
string
returnURL=
"https://www.giftstoindia24x7.com/article?id="
;
if
(inputUrl==
'https://www.giftstoindia24x7.com/a/mothers-day-usa-vs-uk'
)
returnURL=returnURL+
"1"
;
return
returnURL;
}
Reply
Answers (
1
)
How to get the property value and use in another page
Run NopCommerce on several cPanel accounts using NexusCore