find-ObjectDataSource控件找不到对应的泛型方法

问题描述

ObjectDataSource控件找不到对应的泛型方法

<cc1:Num1GridView ID="Num1GridViewShow" runat="server" AutoGenerateColumns="False"
AllowPaging="True" AllowSorting="True" ascendingimageurl="~/images/SortAsc.gif"
descendingimageurl="~/images/SortDesc.gif" AddSequenceColumn="False" Width="98%"

                        <asp:Label ID="LabelPaymentStatus" runat="server" Text='<%# ChangePaymentStatus(DataBinder.Eval(Container, "DataItem(PaymentStatus)","{0}")) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="发货状态" SortExpression="OderStatus">
                    <ItemTemplate>
                        <asp:Label ID="LabelShipmentStatus" runat="server" Text='<%# ChangeShipmentStatus(DataBinder.Eval(Container, "DataItem(ShipmentStatus)","{0}")) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="会员处理状态">
                    <ItemTemplate>
                        <asp:Label ID="LabelMemberOrderState" runat="server" Text='<%# Eval("IsDeleted") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="BuyType" HeaderText="是否为团购订单">
                    <HeaderStyle CssClass="hidden" />
                    <ItemStyle CssClass="hidden" />
                </asp:BoundField>
                <asp:BoundField DataField="AgentID" HeaderText="分销商" SortExpression="AgentID">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>

                <asp:TemplateField HeaderText="分销商提取利润">
                    <ItemTemplate>
                        <asp:Label ID="LabelAgentCommission" runat="server" Text='<%# Eval("Guid") %>' ToolTip="利润含有分站商品金额"></asp:Label>
                        <asp:HiddenField ID="HiddenFieldOrderGuid" runat="server" Value='<%# Eval("Guid") %>' />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>

                <asp:TemplateField HeaderText="提成状态">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# AgentSettlement(Eval("IsCommission")) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />

                </asp:TemplateField>
            </Columns>
        </cc1:Num1GridView>
    </div>
</div>
<asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
<asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="SearchAgent"
    TypeName="ShopNum1.BusinessLogic.ShopNum1_OrderInfo_Action">
    <SelectParameters>
        <asp:ControlParameter ControlID="TextBoxOrderNumber" Name="orderNumber" PropertyName="Text"
            Type="String" />
        <asp:ControlParameter ControlID="TextBoxMemLoginID" Name="memLoginID" PropertyName="Text"
            Type="String" />
        <asp:ControlParameter ControlID="TextBoxName" Name="name" PropertyName="Text" Type="String" />
        <asp:ControlParameter ControlID="TextBoxAddress" Name="address" PropertyName="Text"
            Type="String" />
        <asp:ControlParameter ControlID="TextBoxPostalcode" Name="postalcode" PropertyName="Text"
            Type="String" />
        <asp:ControlParameter ControlID="TextBoxTel" Name="tel" PropertyName="Text" Type="String" />
        <asp:ControlParameter ControlID="TextBoxMobile" Name="mobile" PropertyName="Text"
            Type="String" />
        <asp:ControlParameter ControlID="TextBoxEmail" Name="email" PropertyName="Text" Type="String" />
        <asp:ControlParameter ControlID="DropDownListDispatchModeGuid" Name="dispatchModeGuid"
            PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="DropDownListPaymentGuid" Name="paymentGuid" PropertyName="SelectedValue"
            Type="String" />
        <asp:ControlParameter ControlID="DropDownListOderStatus" Name="oderStatus" PropertyName="SelectedValue"
            Type="String" />
        <asp:ControlParameter ControlID="DropDownListPaymentState" Name="PayMentStatus" PropertyName="SelectedValue"
            Type="String" />
        <asp:ControlParameter ControlID="DropDownListShipmentState" Name="ShipmentStatus"
            PropertyName="SelectedValue" Type="String" />
        <asp:ControlParameter ControlID="TextBoxShouldPayPrice1" Name="shouldPayPrice1" PropertyName="Text"
            Type="Decimal" />
        <asp:ControlParameter ControlID="TextBoxShouldPayPrice2" Name="shouldPayPrice2" PropertyName="Text"
            Type="Decimal" />
        <asp:ControlParameter ControlID="TextBoxCreateTime1" Name="createTime1" PropertyName="Text"
            Type="String" />
        <asp:ControlParameter ControlID="TextBoxCreateTime2" Name="createTime2" PropertyName="Text"
            Type="String" />
        <asp:ControlParameter ControlID="DropDownListMemberDeleteState" Name="isDeleted"
            PropertyName="SelectedValue" Type="Int32" />
        <asp:ControlParameter ControlID="TextBoxAgentID" Name="agentID" PropertyName="Text"
            Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>

解决方案

贴出你发生错误的代码行,codebehind代码和错误提示信息。

时间: 2024-09-11 10:13:48

find-ObjectDataSource控件找不到对应的泛型方法的相关文章

ASP.NET 2.0 ObjectDataSource控件

asp.net|object|控件 ObjectDataSource控件与SqlDataSource控件的对象模型是类似的.ObjectDataSource没有ConnectionString属性,它暴露了TypeName属性,用于指定需要实例化的执行数据操作的对象类型(类名).ObjectDataSource控件与SqlDataSource的命令属性相似,也支持SelectMethod.UpdateMethod.InsertMethod和DeleteMethod等属性,用于指明执行这些数据操作

asp.net 使用ObjectDataSource控件在ASP.NET中实现Ajax真分页_实用技巧

ListView控件本身并没有分页功能,不过借助于ASP.NET中新增加的DataPager控件,我们可以非常方便地对ListView中的数据设置分页,这几乎不需要开发人员写一行代码,将ListView控件放到页面上,设置好布局和DataSource,然后再添加一个DataPager控件,将它的PagedControlID属性设置成ListView的ID,PageSize中设置每页要显示的数据条数,然后在Fields中设置好分页的样式(当然你完全可以不用去管样式,ASP.NET会根据内置的样式来

visual studio-vs的package manager console下载的控件找不到i

问题描述 vs的package manager console下载的控件找不到i Metro Modern UI or MetroFramework brings Windows 8 UI to .NET Windows Forms applications. Supported platforms: Windows XP SP1/SP2/SP3 Windows Vista Windows 7 Windows 8 To install Metro Modern UI - Metro Framew

ASP.NET中 ObjectDataSource控件的DataObjectTypeName属性_基础应用

一.ObjectDataSource 控件说明 获取或设置某个类的名称,ObjectDataSource 控件将该类用于更新.插入或删除数据操作中的参数,而不是从数据绑定控件传递个别的值. 您不用指定传递给 Update.Insert 和 Delete 方法的多个参数,而是可以创建一个累计多个数据字段值的对象.仅给方法传递这一个对象,而不是多个参数. 绑定到数据绑定控件的 ObjectDataSource 控件的默认行为是,数据绑定控件为数据源中的每个参数创建一个 Parameter 对象.如果

如何在ObjectDataSource控件的UpdateParameters中访问EditItemTemplate中的控件?

问题描述 困扰我好长时间了.我想在ObjectDataSource控件的EditItemTemplate里获取到FormView控件编辑里的控件值传给后台.可是提示我未能在ControlParameter"bookNm"中找到控件"txtBookNm".

ObjectDataSource控件的select方法如何应用类似select(sql)带参数的方法

问题描述 比如我有一个Result类,其中有一个Result.SearchResult(strSQL)的select方法,这个类还有更新,删除方法,我现在已经指定了更新,删除方法,而且Result.SearchResult(strSQL)也以指定,其中的strSql参数指定为None,strSQL是通过组合选择拼接而成的,我想让ObjectDataSource在程序中指定strSQL,完整的代码如何写?this.ResutlObjectDataSource.SelectParameters["s

使用ObjectDataSource控件在ASP.NET中实现Ajax真分页

ASP.NET 3.5中新增加的ListView控件是一个用于页面数据绑定和界面布局的非常棒的控件,它在 ASP.NET 2.0 GridView的基础上做了很多改进,用户在使用时可以控制的元素更多,开发时的灵活性更大 了,个人觉得ListView在使用时比DataGrid和GirdView更加顺手.ListView控件本身并没有分页功能,不 过借助于ASP.NET中新增加的DataPager控件,我们可以非常方便地对ListView中的数据设置分页,这几乎 不需要开发人员写一行代码,将List

ASP.NET 2.0之ObjectDataSourc控件

asp.net|object|控件 学习asp.net2.0有一段时间了,我不是从1.1开始的,所以,也说不出2.0相对于1.1来讲有多大的变化或是在操作上有多大的便利,我这里只把我学习2.0的一些小经验与大家分享. 2.0中有一个ObjectDataSource数据源控件,通过它,可以把中间层或其它层的数据绑定到dropdownlist/datalist/repeater/gridview等数据控件中,为什么这里只ObjectDataSource而不提SqlDataSource或其它的数据源控

在ASP.NET 2.0中操作数据:在GridView控件中使用TemplateField

asp.net|控件|数据 导言     让我们花点时间在浏览器中来看看我们的成果.这时,你将看到一个表格, 表格中每一个记录都是一个雇员的信息,一共有四列:一个是雇员的姓, 一个是名字,一个是头衔,还有一个是他们的受雇日期.     就像你看到的那样,TemplateField由两个模板组成--一个ItemTemplate,它有一个Label控件,其Text属性被设置为FirstName数据字段的值:还有一个EditItemTemplate,它有一个TextBix控件,其Text属性也被设置为