本文介绍了网格视图绑定中的异常“没有为一个或多个所需参数给出值".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我通过SQL数据源绑定网格视图,对此我没有此代码

Hello All..
i am binding grid view by sql data Source for which i have don this code

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" AllowPaging="True" 

        AllowSorting="True" onselectedindexchanged="lbtn_buyNow_Click"  

        CssClass="registration_form" BorderColor="#E3E3E1" PageSize="20">
         <alternatingrowstyle />
        <columns>
            <asp:BoundField DataField="StartDate" HeaderText="Start Date" />
            <asp:BoundField DataField="Duration" HeaderText="Duration" />
            <asp:BoundField DataField="Title" HeaderText="Title" />
            <asp:BoundField DataField="Vanue" HeaderText="Vanue" />
            <asp:BoundField DataField="City" HeaderText="City" />
            <asp:BoundField DataField="Type" HeaderText="Type" />
            <asp:BoundField DataField="ID" HeaderText="ID" Visible="false"/>
            <asp:TemplateField HeaderText="Details">
                <itemtemplate>
                    <asp:LinkButton ID="lbtndetails" runat="server" oncommand="lbtndetails_Command" CommandArgument='<%# Bind("ID") %>' CausesValidation="False">View Details
                </itemtemplate>

            <asp:TemplateField HeaderText="Buy Now">
                <itemtemplate>
                    <asp:LinkButton ID="lbtn_buyNow" runat="server" onclick="lbtn_buyNow_Click" CausesValidation="False">Buy Now
                </itemtemplate>

        </columns>

   <asp:AccessDataSource ID="AccessDataSource1" runat="server" 

        DataFile="~/App_Data/Users.mdb" 

        

    SelectCommand="SELECT [ID], [StartDate], [Duration], [Title],[Vanue],[City],[Type] FROM [trainingcalendar]">


但是有一个例外,因为...


but there is a exception as...

No value given for one or more required parameters.


请帮助我做错什么...


plz help what i doing wrong...

推荐答案


这篇关于网格视图绑定中的异常“没有为一个或多个所需参数给出值".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 12:21
查看更多