locked
Modaldialog box post back RRS feed

  • Question

  • Hi All,

    I am opening a modaldialog box from Lead list screen on a button click placed on toolbar. Now in the modaldialog box i am showing the list of Leads that are selected and populating the list of all users in the system in a listbox. Now user can select any one of the user and and click on the button that is placed below the list box. 

    For the postback to work in modaldialog box i have placed 

    <base target="_self" /> under head tag. So, postback is happening to the same page.

    But the problem is i am loosing the users data that i have bind to the listbox initially when the postback is taking place. What can be the problem?

     

    I have checked ths in an normal asp.net application, the bind data is still retained after the postback also. But not working for a CRM web app.

    Thanks

    Thursday, March 10, 2011 7:19 AM

Answers

  • It's a common problem with CRM ISV apps.  If you have placed the page in the ISV folder with no overriding web.config it will inherit its application behaviour from the CRM.  The CRM does not enable session or viewstate; the latter (viewstate) is required in order to maintain the state of server-populated controls such as a listbox.

    You can enable viewstate for your page either globally in web.config or in the page via the Page directive:

    <%@ Page Language="C#" ... EnableViewState="true" %>
    


    --pogo (pat)
    Thursday, March 10, 2011 10:36 PM