I want to add news scroller in _ColumnsTwo.cshtml

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 năm cách đây
I want to add news scroller in _ColumnsTwo.cshtml which shows 3 news at a time.

I am not sure how to do it in .cshtml file.
Is there a way I can use .ascx web control and add it to .cshtml (may be not?)

I will appreciate if anyone can point me to some example or code.
12 năm cách đây
vasa wrote:
I want to add news scroller in _ColumnsTwo.cshtml which shows 3 news at a time.

I am not sure how to do it in .cshtml file.
Is there a way I can use .ascx web control and add it to .cshtml (may be not?)

I will appreciate if anyone can point me to some example or code.


news scroller ?? jquery !! .. do you want it on homepage or news page
12 năm cách đây
I want it on Home page in _ColumnsTwo.cshtml
I am not sure how to do it on MVC. (is there a way I can add it in .ascx page and add that as a user control)
12 năm cách đây
vasa wrote:
I want it on Home page in _ColumnsTwo.cshtml
I am not sure how to do it on MVC. (is there a way I can add it in .ascx page and add that as a user control)


We dont use user controls in mvc , its used in webforms, you can use partial views in mvc or html helpers, the best thing is to read up on mvc and get familiar with it before modifying the code.
http://www.asp.net/mvc/tutorials/nerddinner/re-use-ui-using-master-pages-and-partials
12 năm cách đây
Thanks for the link. I looked at your link it does make sense with .aspx page but with NOP Commerce v2.4 there is no .aspx page and I want to add news scroller on home page in _ColumnsTwo.cshtml and I am not even sure where to begin. I will appreciate if someone can point to some example of how I can do that.

I also want help on where can I can call Xignite Service (in some controller) and can save data from web service to database and eventually get data from the DB to use in my News Scroller.

All examples are pretty basic. Need examples with NOP Commerce v2.4

Thanks for your quick reply.
12 năm cách đây
vasa wrote:
Thanks for the link. I looked at your link it does make sense with .aspx page but with NOP Commerce v2.4 there is no .aspx page and I want to add news scroller on home page in _ColumnsTwo.cshtml and I am not even sure where to begin. I will appreciate if someone can point to some example of how I can do that.

I also want help on where can I can call Xignite Service (in some controller) and can save data from web service to database and eventually get data from the DB to use in my News Scroller.

All examples are pretty basic. Need examples with NOP Commerce v2.4

Thanks for your quick reply.


Sorry for being late on replies due to timing difference,

For calling newsletterbox , just call :
<div class="news-subscription">

@Html.Action("NewsletterBox", "Newsletter")
</div>

in the columnstwo layout.

If you want to show the list of news on columnstwo layout

@Html.Action("List", "News")

For creating a partial view which is equivalent to user controls ,

Right click on the View, Go to ADD>View,
Click on the checkbox [ create as a partial view] select the masterpage, if you want to target specific model , for instance in your case you should go for strongly typed view and select NewsItemListModel (Nop.Web.Models.News), depends which type of partial view you want , the best thing is to read up on mvc 3 a bit from the beginning on asp.net , or buy a book professional asp.net mvc 3, which worked for me.
12 năm cách đây
have added a tag in a menu like(about us), the problem is how to redirect to a new page
12 năm cách đây
i have added a tag in a menu like(about us), the problem is how to redirect to a new page
12 năm cách đây
aarif wrote:
i have added a tag in a menu like(about us), the problem is how to redirect to a new page

???
12 năm cách đây
Just use a flash news ticker and add needed code in a widget.
Give a look at www.flashxml.net and user the html widget plugin (2.40) https://www.nopcommerce.com/p/392/html-widget.aspx.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.