I have this strange issue and dont know just what is happening.
I am building an application in Asp.Net 4.0 (implemented routing feature introduced with this version) and Entity framework 4.
There are quite a few issues and as I am clueless as to what is going wrong I may not describing my problem completely; so kindly let me know if you need any further information about the issue or application:
- In the debeugging mode, when I inspect the code behind (.cs file) , after the page_load and the datapager pre_render events are fired instead of displaying the page, it reloads the page and returns and stops to at the break point that I had set at the page_load event.
Please help as I am just unsure where to being for hunting for the problem.
I hard coded the values on the page and tried to run it independently; it worked.
Then when I again did it the usual way by using Routing it stopped. So I guess the issue is with Routing.
Hope this much info helps inidentifying the issue.
After having googled all over.. I think the datapager control may be causing the issue as I guess it is not fully compatible with the Routing feature introduced with asp.net 4.0.
But again to my surprise.. I commented out the datapager control and checked again.. phew.. the problem still persists..
Its been over 2 days i m stuck with the problem... grrhh.. pulling my hair!!
finally... figured it out...
datapager has poor support for routing..
will have to switch back to some other control.. probably datalist.. instead of the Listview..
Come on Microsoft.. test the control and then release it or atleast attach a note, warning about its limitations.. It will save us developers lot of meaningful man hours |-(
Datapager uses Post method by default.
To use the Get method we have use its QuerystringField property.
It is this property that I guess has issues with the Routing.