Open Ankita-XIT opened 9 years ago
Hi Ankita-XIT, i just downloaded the nopCommerce source code from codeplex. Just go to nop.Web => Views => Shared. Then you are able to see the master pages. In that case the master page is not called "layout" they call it _Root.cshtml and _Root.Head.cshtml. Hope this helps!
Hello, I have follow the steps you suggested. I have created one new view page named _Head.cshtml. Placed code after closing tag in _Root.Head.cshtml page. And it also works but for login and logout process I am getting this error: Server cannot modify cookies after HTTP headers have been sent.
Can you please suggest which is the best place to put this code in view page: @Html.FlushHead()
@Ankita-XIT,
I think you have two options here:
FlushAntiForgeryToken = true
to the FlushHead
attribute and fix your problem.Unfortunately, there isn't a great way to disable specific actions if you are globally enabling flushing. There's an item on the backlog #6 to do this though, if you or someone else would like to contribute it.
Hello,
If I want to customized your code then which files I need to add in my project? I have added ContollerBaseExtension.cs, FlushHeadAttribute.cs & HtmlHelperExtension.cs files. Moreover, I have restricted Login and Logout Action methods by implementing another filter attribute.
The best you can do is to fork the whole project using GitHub client, change or modify code, compile it and then you add a reference to your project.
I want to implement Flush in my whole project. But as I am working on nopCommerce based web application I am little bit confused How can I implement it because it does not contain any _Lauout.cshtml page as you have mentioned in your document that I need to write @Html.FlushHead() in _Lauout.cshtml page.
Can you please help me with this?
Thanks, Ankita