How to add new .aspx file in NOP2.60?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
Hi
I am very new to MVC, so added a new aspx file which is like feedback form structure and sends the users request as a mail to admin. I plan to keep the link for aspx file in the footer(footer.cshtml) part. All my development is finished. But i  unable to run the form seperately and wont know how to hyper link the aspx file in the footer region.

In footer part i codes like below,
<table><tr> <td align="left"><a href="/Views/Common/Feedback.aspx">Contact Us</a></td></tr></table>

but its showing error as

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.


Did i need to register the .aspx file at any where else in the application to run it successfully.?
Pls guide me.

Thanks in advance.
Regards
Gopinath.K
11 years ago
you have to add a route in Infrastructure/routeprovider.cs file
11 years ago
elaa1979 wrote:
you have to add a route in Infrastructure/routeprovider.cs file


Thanks Mr.Elaa,

Did i am right.?

my file name is feedback.aspx

   //feedback
            routes.MapLocalizedRoute("Feedback",
                            "Feedback",
                            new { controller = "Common", action = "Feedback" },
                            new[] { "Nop.Web.Controllers" });
11 years ago
yes.
11 years ago
elaa1979 wrote:
yes.


Still it shows the same error.. as resource not found.
11 years ago
send me the files controller/model/and view. i'll check it and send you on monday.
11 years ago
re:  <a href="/Views/Common/Feedback.aspx">

Your not doing MVC correctly. I.e. you can't just put a .aspx page in the View folder.  You need Model & View & Controller.

Study the code of the plugin I suggested in your other post
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.