English 中文(简体)
ajax short html function syntax差错
原标题:ajax short html function syntax error

This is my first time to paint a client web page from inside a webmethod function. Please help and tell me why this syntax is wrong?

这是所有职能——即罚款:

[WebMethod]
public IList<OrderViewDTO> GetTaskProgress(DateTime xDATEx)
{
    try
    {
        var xDate2 = xDATEx.AddDays(1);
        new OrderDataRepository()
            .GetAllOrderData()
            .Where(x=>x.POD_DATE>=xDATEx && x.POD_DATE < xDate2)
            .GroupBy(o => o.User)
            .Select(g => new OrderViewDTO
            {
                DriverId = g.Key.Id,
                PdriverName = g.Key.Name,
                OrderCount = g.Count(),
                OrderCountWhereNameIsNotNull = g.Count(o => o.RECEIVE_NAME != null)
            })
            .ToList();

can you please show me how to print a div and a values like <%# Eval("DriverName") %> inside the div inside the above function instead of my original code:

<asp:Repeater ID="DataViewer" runat="server">
            <ItemTemplate>
                <div style= border: 1px; width: 600px; overflow-x: auto; overflow-y: hidden; >
                    <div style= float: left; >
                        <%# Eval("DriverName") %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </div>
                    <div style= border: 3px solid black; float: left; width: <%# Convert.ToInt32(Eval("OrderCount")) * 50 %>px >
                        <div style= border: 0px; float: left; width: <%# ((Convert.ToDouble(Eval("OrderCount")) - Convert.ToDouble(Eval("OrderCountWhereNameIsNotNull"))) / Convert.ToDouble(Eval("OrderCount"))) * 100 %>%; >
                            <%# Eval("OrderCount") %></div>
                        <div style= border: 0px; float: right; width: <%# (Convert.ToDouble(Eval("OrderCountWhereNameIsNotNull")) / Convert.ToDouble(Eval("OrderCount"))) * 100 %>%;
                            background-color: red; >
                            <%# Eval("OrderCountWhereNameIsNotNull") %></div>
                    </div>
                </div>
                <br />
            </ItemTemplate>
        </asp:Repeater>
最佳回答

在黑暗中,我们像你们一样,看着命令的桌旁。 页: 1 <alredy”结构中的超文本项目已关闭表

采用关闭表格,标明你开始采用的结构,而按命令将每美元编为AFTER。 页: 1 项目。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签