naeeme
یک شنبه 18 مرداد 1388, 14:17 عصر
در یکی از صفحات سایتم بر روی سرور من خطای
A call to Bind was not well formatted. Please refer to documentation for the correct parameters to Bind.
دریافت می کنم. در این صفحه چند DropDownList و گرید ویو دارم که با استفاده از object data source پر میشن.
نکته جالب این هست که اگر بر روی IIS سیستم خودم فایل های پابلیش شده رو قرار بدم، اون صفحه بدون خطا میاد و می تونم باهاش کار کنم اما وقتی همون فایلها رو روی سرور میذارم، صفحه خطا میده.
در هنگام لود شدن صفحه، فقط dropdownlistها پر میشن و گریدها visible نیستند.
به نظر شما مشکل از کجاست؟
کد مربوط به گرید:
<asp:GridView Visible="False" PagerSettings-Mode="NumericFirstLast" ID="grvReport"
Width="98%" runat="server" AutoGenerateColumns="False" AllowPaging="True" DataSourceID="odsReport"
BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
CellPadding="3" GridLines="Vertical" PageSize="25">
<PagerSettings Mode="NumericFirstLast"></PagerSettings>
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<Columns>
<asp:TemplateField HeaderText="ردیف">
<ItemTemplate>
<asp:Label ID="lblrow" runat="server" Text=" <%# getRowNum() %>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="حساب">
<ItemTemplate>
<asp:Label ID="Label2" runat="server"
Text='<%# Bind("programInfo.BankAcountName") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="BankName" HeaderText="بانک" SortExpression="BankName" />
<asp:TemplateField HeaderText="برنامه">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("programInfo.programName") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="refId" HeaderText="کد ارجاع" />
<asp:BoundField DataField="requestId" HeaderText="کد درخواست" />
<asp:BoundField DataField="OrderPersianDate" HeaderText="تاریخ" />
<asp:BoundField DataField="orderStatuseDescription" HeaderText="وضعیت سفارش" SortExpression="orderStatuseDescription" />
<asp:BoundField DataField="amount" HeaderText="مبلغ" />
<asp:BoundField DataField="Fname" HeaderText="نام" SortExpression="Fname" />
<asp:BoundField DataField="Lname" HeaderText="نام خانوادگی" SortExpression="Lname" />
<asp:BoundField DataField="Tel" HeaderText="شماره تماس" SortExpression="Tel" />
<asp:BoundField DataField="Description" HeaderText="توضیحات" SortExpression="Description" />
<asp:BoundField DataField="Ip" HeaderText="Ip" />
</Columns>
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
<asp:ObjectDataSource ID="odsReport" runat="server" SelectMethod="getListOfTrans"
TypeName="BLL.Transactions" OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:ControlParameter ControlID="txtfname" Name="name" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtlname" Name="lastName" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtTel" Name="TelNumber" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtRefId" Name="refid" PropertyName="Text" Type="Int64" />
<asp:ControlParameter ControlID="txtRequestId" Name="requestid" PropertyName="Text"
Type="Int64" />
<asp:ControlParameter ControlID="ddlProgram" Name="programid" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="ddlBankAccount" Name="bankAccount"
PropertyName="SelectedValue" Type="Byte" />
<asp:ControlParameter ControlID="ddlBank" Name="BankCode" PropertyName="SelectedValue"
Type="Byte" />
<asp:Parameter Name="Ip" Type="String" />
<asp:ControlParameter ControlID="dtStart" Name="OrderStartDate" PropertyName="GregorianDateTime"
Type="String" />
<asp:ControlParameter ControlID="dtEnd" Name="OrderEndDate" PropertyName="GregorianDateTime"
Type="String" />
<asp:Parameter Name="amount" Type="Int64" />
<asp:ControlParameter ControlID="ddlStatus" Name="OrderState" PropertyName="SelectedValue"
Type="Object" />
</SelectParameters>
</asp:ObjectDataSource>
کد مربوط به DropDownList:
<asp:DropDownList ID="ddlBankAccount" runat="server" RepeatDirection="Horizontal"
DataSourceID="odsBankAccount" DataTextField="baname" DataValueField="bacode"
AutoPostBack="True">
</asp:DropDownList>
<asp:ObjectDataSource ID="odsBankAccount" runat="server" SelectMethod="GetData" TypeName="DAL.paymentServiceTableAdapters.tb_bank_accountTab leAdapter"
OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:Parameter DefaultValue="0" Name="bankacountCode" Type="Byte" />
<asp:Parameter DefaultValue="255" Name="status" Type="Byte" />
</SelectParameters>
</asp:ObjectDataSource>
A call to Bind was not well formatted. Please refer to documentation for the correct parameters to Bind.
دریافت می کنم. در این صفحه چند DropDownList و گرید ویو دارم که با استفاده از object data source پر میشن.
نکته جالب این هست که اگر بر روی IIS سیستم خودم فایل های پابلیش شده رو قرار بدم، اون صفحه بدون خطا میاد و می تونم باهاش کار کنم اما وقتی همون فایلها رو روی سرور میذارم، صفحه خطا میده.
در هنگام لود شدن صفحه، فقط dropdownlistها پر میشن و گریدها visible نیستند.
به نظر شما مشکل از کجاست؟
کد مربوط به گرید:
<asp:GridView Visible="False" PagerSettings-Mode="NumericFirstLast" ID="grvReport"
Width="98%" runat="server" AutoGenerateColumns="False" AllowPaging="True" DataSourceID="odsReport"
BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
CellPadding="3" GridLines="Vertical" PageSize="25">
<PagerSettings Mode="NumericFirstLast"></PagerSettings>
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<Columns>
<asp:TemplateField HeaderText="ردیف">
<ItemTemplate>
<asp:Label ID="lblrow" runat="server" Text=" <%# getRowNum() %>" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="حساب">
<ItemTemplate>
<asp:Label ID="Label2" runat="server"
Text='<%# Bind("programInfo.BankAcountName") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="BankName" HeaderText="بانک" SortExpression="BankName" />
<asp:TemplateField HeaderText="برنامه">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("programInfo.programName") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="refId" HeaderText="کد ارجاع" />
<asp:BoundField DataField="requestId" HeaderText="کد درخواست" />
<asp:BoundField DataField="OrderPersianDate" HeaderText="تاریخ" />
<asp:BoundField DataField="orderStatuseDescription" HeaderText="وضعیت سفارش" SortExpression="orderStatuseDescription" />
<asp:BoundField DataField="amount" HeaderText="مبلغ" />
<asp:BoundField DataField="Fname" HeaderText="نام" SortExpression="Fname" />
<asp:BoundField DataField="Lname" HeaderText="نام خانوادگی" SortExpression="Lname" />
<asp:BoundField DataField="Tel" HeaderText="شماره تماس" SortExpression="Tel" />
<asp:BoundField DataField="Description" HeaderText="توضیحات" SortExpression="Description" />
<asp:BoundField DataField="Ip" HeaderText="Ip" />
</Columns>
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
<asp:ObjectDataSource ID="odsReport" runat="server" SelectMethod="getListOfTrans"
TypeName="BLL.Transactions" OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:ControlParameter ControlID="txtfname" Name="name" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtlname" Name="lastName" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtTel" Name="TelNumber" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtRefId" Name="refid" PropertyName="Text" Type="Int64" />
<asp:ControlParameter ControlID="txtRequestId" Name="requestid" PropertyName="Text"
Type="Int64" />
<asp:ControlParameter ControlID="ddlProgram" Name="programid" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="ddlBankAccount" Name="bankAccount"
PropertyName="SelectedValue" Type="Byte" />
<asp:ControlParameter ControlID="ddlBank" Name="BankCode" PropertyName="SelectedValue"
Type="Byte" />
<asp:Parameter Name="Ip" Type="String" />
<asp:ControlParameter ControlID="dtStart" Name="OrderStartDate" PropertyName="GregorianDateTime"
Type="String" />
<asp:ControlParameter ControlID="dtEnd" Name="OrderEndDate" PropertyName="GregorianDateTime"
Type="String" />
<asp:Parameter Name="amount" Type="Int64" />
<asp:ControlParameter ControlID="ddlStatus" Name="OrderState" PropertyName="SelectedValue"
Type="Object" />
</SelectParameters>
</asp:ObjectDataSource>
کد مربوط به DropDownList:
<asp:DropDownList ID="ddlBankAccount" runat="server" RepeatDirection="Horizontal"
DataSourceID="odsBankAccount" DataTextField="baname" DataValueField="bacode"
AutoPostBack="True">
</asp:DropDownList>
<asp:ObjectDataSource ID="odsBankAccount" runat="server" SelectMethod="GetData" TypeName="DAL.paymentServiceTableAdapters.tb_bank_accountTab leAdapter"
OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:Parameter DefaultValue="0" Name="bankacountCode" Type="Byte" />
<asp:Parameter DefaultValue="255" Name="status" Type="Byte" />
</SelectParameters>
</asp:ObjectDataSource>