Limiting view state information on AJAX calls

后端 未结 5 1984
予麋鹿
予麋鹿 2020-12-19 20:26

I have an Entry Form and a GridView on the same page. Selecting a row from the GridView populates the TextBoxes in the Entry Form above it with all the entries of the GridVi

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-19 20:58

    Short answer is NO.

    Here is a way to free page from clutches of viewstate on ajax calls

    • Do not depend on the row click event of the grid view.
    • Add a link column to the grid view. Do not use server click event.
    • link When user clicks the link make an ajax call by sending the id of the row. You will be using a jQuery to make an ajax get call.
    • Once the ajax call returns, take the data of the record and find the form elements, again using jQuery and populate them

提交回复
热议问题