PDA

View Full Version : سوال: ایجاد خطای نابهنگام در دراپ لیست



khorsandreza
شنبه 13 آذر 1389, 19:45 عصر
گاهي مواقع خطاي زير در برنامه اتفاق مي افته و تقريبا علت ان برايم نا مکشوف شده دو تا سوال بود
1 - اصلا امکان اينکه مثل محيط سي شارپ با استفاده از try ...catch اين نوع خطا ها را به تله انداخت؟
2 - اين خطا اصولا چه مواقع اتفاق مي افته





Server Error in '/' Application.

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Source Error:

Line 151: </td>Line 152: <td style="width: 20%">Line 153: <asp:DropDownList ID="DropDownList2" runat="server" Line 154: DataSourceID="SqlDataSource1" DataTextField="ModuleStr" Line 155: DataValueField="ModuleName" Enabled="False" Font-Names="Tahoma"