1) Don't use apex:form tag inside apex:form tag 2) User trasient keywords for variable which is needed only for the duration of a page request 3) Declare some variable as static if possible, create static code block to recreate them in each request 4) Check your SOQL queries, if you are querying additional fields, never used or required on visualforce page. Please select only required fields. 5) Using static variable or static block aslo helps to reduce viewstate size as it doesn't get transmitted through the view state
Here are the links to avoit the view state limit in vf page.
Please find below:
https://developer.salesforce.com/page/An_Introduction_to_Visualforce_View_State
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_transient.htm
Thanks,
Shiva
check few posts and follow them
http://learningthecloudway.blogspot.in/2013/02/how-to-deal-with-error-maximum-view.html
http://sfdcsrini.blogspot.com/2014/06/what-is-maximum-view-state-size-limit.html
https://help.salesforce.com/apex/HTViewSolution?urlname=State-size-limit-1327107599450&language=en_US
1) Don't use apex:form tag inside apex:form tag
2) User trasient keywords for variable which is needed only for the duration of a page request
3) Declare some variable as static if possible, create static code block to recreate them in each request
4) Check your SOQL queries, if you are querying additional fields, never used or required on visualforce page. Please select only required fields.
5) Using static variable or static block aslo helps to reduce viewstate size as it doesn't get transmitted through the view state
Thanks,
Amit