Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1061: 'ASP.search_user_aspx' does not contain a definition for 'GridView1_SelectedIndexChanged' and no extension method 'GridView1_SelectedIndexChanged' accepting a first argument of type 'ASP.search_user_aspx' could be found (are you missing a using directive or an assembly reference?) Source Error: Line 16: <tr> Line 17: <td dir="rtl" style="text-align: center; margin-right: 100px;"> Line 18: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="UserId" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" HorizontalAlign="Center" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" style="margin-top: 0px" Width="101%"> Line 19: <AlternatingRowStyle BackColor="White" /> Line 20: <Columns>
درود بر شما
من از این gridview قبلا استفاده کردم و دوباره در یک پروژه دیگه استفاده کردم با همون اطلاعات( چون دقیقا همون رو میخاستم) اما اجرا میکنم این خطا رو میده. حتی Configure Data source هم زدم و دوباره مراحل رو انجام دادم اما باز همین خطا رو میده.
لطفا راهنمایی بفرمایید.
سپاس
قسمت زیر را از تعریف Grid پاک کنید و تست کنید
OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
سپاس از راهنمایی تون. خطا رفع شد. لطف میکنید یه توضیحی بدید چرا با برداشتن این ویژگی خطا رفع شد؟
سپاس
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)