Swapnam Posted July 23, 2009 Posted July 23, 2009 Hi All, I am facing issues after migrating our application from VS 2003 to VS 2008. We use Asp.net and C#(as code behind). Therea are 2 dropdowns in the page. On change of values of these dropdowns we need to grop the data accordingly and display in a datagrid. By default the data will be sorted on the column that is selected in the dropdown. After the data is displayed, if user clicks on some other column in the datagrid header, data should be sorted on the column clicked by the user. But after migration to VS 2008, when user is clicking on some other column in the datagrid, application is not changing the sorting column. Example: I select "Age" in the dropdown. So, data is grouped by "Age" and will be displayed by sorting the data on "Age". Now if I click on "Name" column in the datagrid header, then data displayed should be "grouped by Age and sorted by Name". But after migration, applicaiton is displaying data "grouped by Age and reverse sorted by Age". While debugging I found that it is being caused since page_load event is fired twice in this case. When page load is fired for the first time it is loading the page as expected. But when fired for the second time all the parameters are reset and thus causing the issue. Can anybody let me know what could have caused this issue? Please help me in solving this issue. Thanks in advance. Quote
Administrators PlausiblyDamp Posted July 23, 2009 Administrators Posted July 23, 2009 This can happen if you have the option to auto wire up events set in the @Page directive and if you are also manually attaching the event handler in code. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Swapnam Posted July 23, 2009 Author Posted July 23, 2009 I checked in all pages of the application and found that Autoeventwireup is set to false. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.