Click here to Skip to main content
15,890,186 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionMVC, my views can't see or reference the namespace MvcApplication in Global.asax Pin
jkirkerx12-Apr-17 8:50
professionaljkirkerx12-Apr-17 8:50 
AnswerRe: MVC, my views can't see or reference the namespace MvcApplication in Global.asax Pin
Afzaal Ahmad Zeeshan12-Apr-17 9:17
professionalAfzaal Ahmad Zeeshan12-Apr-17 9:17 
GeneralRe: MVC, my views can't see or reference the namespace MvcApplication in Global.asax Pin
jkirkerx12-Apr-17 10:17
professionaljkirkerx12-Apr-17 10:17 
QuestionIs there a control that displays a PDF and submits the pdf back to the server? Pin
Michael Clinton11-Apr-17 9:18
Michael Clinton11-Apr-17 9:18 
AnswerRe: Is there a control that displays a PDF and submits the pdf back to the server? Pin
ChetanAhire17-Apr-17 1:29
ChetanAhire17-Apr-17 1:29 
QuestionWriting multiple records to a binary file, reading the file records so I can add a record and write Pin
jkirkerx10-Apr-17 10:41
professionaljkirkerx10-Apr-17 10:41 
AnswerRe: Writing multiple records to a binary file, reading the file records so I can add a record and write Pin
jkirkerx10-Apr-17 11:38
professionaljkirkerx10-Apr-17 11:38 
QuestionXPagedList, StaticPageList, View, looping items with foreach, loops all the items and not the paginated ones Pin
jkirkerx10-Apr-17 9:17
professionaljkirkerx10-Apr-17 9:17 
I have this model and view, in which instead of the model just being a list of items, it's order information and a list of orders.
So I used StaticPagedList to make a PagedList of the Orders which seems to work fine, and the paginator works as well.
It's the list of Orders in the view, which list all 13 orders instead of the first 5 orders.
I look at the model in the controller and I see the PagedListItems, and a object called "Results View" that has all 13 items.

This is my first time using StaticPagedList, not sure if I'm missing something here or not,
But my question is how do I get orders 1 - 5 and not the whole list.

My Controller Code in which I make the list
// Manually generate the X.PagedList.Mvc because the paged model is a child of the model.
model.Orders_PagedList = new StaticPagedList<model_account_order>(model.Orders, pI, sI, model.Orders_Count);
My View Code in which I loop the list
@if (Model.Orders_PagedList.Count() > 0)
       {
           foreach (var order in Model.Orders_PagedList)
           {
               string shipTo = "" + order.ShipTo.FirstName + " " + order.ShipTo.LastName + "<br />";
               shipTo += order.ShipTo.StreetAddress1 + "<br />";
               if (order.ShipTo.StreetAddress2 != string.Empty)
               {
                   shipTo += order.ShipTo.StreetAddress2 + "<br />";
               }
               shipTo += order.ShipTo.City + " " + order.ShipTo.StateCode + " " + order.ShipTo.PostalCode + "<br />";
               shipTo += order.ShipTo.CountryCode + "<br />";
               shipTo += "Phone: " + order.ShipTo.PhoneNumber + " " + order.ShipTo.PhoneNumberExt;
If it ain't broke don't fix it

AnswerRe: XPagedList, StaticPageList, View, looping items with foreach, loops all the items and not the paginated ones [solved] Pin
jkirkerx10-Apr-17 9:26
professionaljkirkerx10-Apr-17 9:26 
QuestionChange a color of single data labels in graph using crystal reports Pin
Member 1145200410-Apr-17 0:19
Member 1145200410-Apr-17 0:19 
QuestionWebhook receiver from the ground up using ASP.NET? Pin
cotsjdixon31-Mar-17 6:39
cotsjdixon31-Mar-17 6:39 
AnswerRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming31-Mar-17 7:41
mveRichard Deeming31-Mar-17 7:41 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
cotsjdixon31-Mar-17 7:44
cotsjdixon31-Mar-17 7:44 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming31-Mar-17 7:47
mveRichard Deeming31-Mar-17 7:47 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
cotsjdixon31-Mar-17 7:53
cotsjdixon31-Mar-17 7:53 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming31-Mar-17 8:26
mveRichard Deeming31-Mar-17 8:26 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming31-Mar-17 8:29
mveRichard Deeming31-Mar-17 8:29 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
cotsjdixon31-Mar-17 8:44
cotsjdixon31-Mar-17 8:44 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming31-Mar-17 8:47
mveRichard Deeming31-Mar-17 8:47 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
cotsjdixon31-Mar-17 9:03
cotsjdixon31-Mar-17 9:03 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming31-Mar-17 9:07
mveRichard Deeming31-Mar-17 9:07 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
cotsjdixon6-Apr-17 8:09
cotsjdixon6-Apr-17 8:09 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming6-Apr-17 8:15
mveRichard Deeming6-Apr-17 8:15 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
cotsjdixon6-Apr-17 8:35
cotsjdixon6-Apr-17 8:35 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming6-Apr-17 9:08
mveRichard Deeming6-Apr-17 9:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.