Please..
Sorry my poor English...
Exception in postback if web page include WebDialogWindow..
Error Message : Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request
I'm using ContentUrl in WebDialog.. html content from my extern url is render in self page, after load completed, any postback is fire exception Thanks..
I have a web page with a dialog window which shows an external web site. I am getting no errors in postback.
Sending the code you are using may help to understand the problem you are experiencing.
Thanks by response.
WebDialigWidows Code: (I change ContentUrl by UserControl but the problem persist.
<ig:WebDialogWindow ID="webVehicleDialog" runat="server" StyleSetName="Office2007Blue" Height="470px" InitialLocation="Centered" Modal="True" Width="820px" WindowState="Hidden" Moveable="False"> <ContentPane ScrollBars="Hidden"> <Template> <uc1:policyVehicle ID="PolicyVehicle1" runat="server" /> </Template> </ContentPane> <Header CaptionText="Policy Vehicles "> </Header> </ig:WebDialogWindow>
ASP Button Code :
<asp:LinkButton ID="btnCopy" runat="server" CausesValidation="false" OnClick="btnCopy_Click">Copy</asp:LinkButton>
Postback button throw exception. If i remove WebDialogWindow control from page.. no errors in postback throw.
Thanks
I have taken your code and pasted it into a new website, and it works !!!
All I added was a button and some javascript to display the webdialog.
I have attached a zip file with the files :-
Default.aspx Default.aspx.vb web.config
You can paste these into a new web site, and you will have to import the style 'Office2007Blue'
If this does not run on your machine, then I think you need to look at the versions of the Infragistics controls you are running.
On my machine, I have VS2008 Team Edition, Infragistics 2008 V1
Let me know if this works.
Thanks,
I will be test your code in home.. but.. my problems is not opening dialog, it work fine. My problems is take postback in page. In your code you don't include any postback. I will be try add in your code <asp:button.. runat="server" OnClick="Testing_postBack" /> and see if postback haave not problem.
Nevertheles thanks for your intentions of help me.
I have added a button to the page of code I sent you, and I can execute a postback with no errors !!
I have also added a button inside the dialogwindow, and this can postback with no errors !!
Check the version numbers of the IG controls.
Let me know your results.
I added a simple Master page to my test project (Just a div at the top of the page), added a new page which inherits the Master page, and copied the code across. I had to change the javascript to open the dialog, adding 'ct100_ContentPlaceHolder1' in the $find to reference the dialogwindow.
I then ran the page with no AutoEventWireup in the Master page, and all worked. I then set AutoEventWireup in the Master page to true, and again all worked. I then tried every combination of AutoEventWireup in both the Master page and the web page, and again all worked !!!
On my own website I use Master pages and have dialogwindows being displayed correctly, some even having other Infragistics controls inside the dialogwindows.
Your problem seems to stem from using VS2005 and CRL 2.0, I am not sure why, but remember that AJAX is now built into VS2008.
Perhaps someone at IG could help ?
Hi, :(
I don´t know what happen in my project.. finally, i have WebDialogWindow runing okay.
In my project i don´t use LoadControl or Controls.Add.. I'm using VS 2005 CLR 2.0.. if remove WebDialogWindow (in aspx page, not in master page) with AutoEventWireup in the Master page to true.. all worked .. if add WebDialogWindow in aspx page with AutoEventWireup in the Master page to true, throw exception.. if set AutoEventWireup in the Master page to false, all worked!! :(
thanks very much by your time samsonca..
Very hard to tell based on what I've seen in this forum thread. The error message you get is typically a generic ASP.NET error - if you are loading controls dynamically to placeholders (e.g. Page.LoadControl or PlaceHolder1.Controls.Add - and somehow they are loaded in different places after postback, this error occurs.
Maybe you can attach a small subset of your project reproducing the problem here or send it directly to Developer Support for additional information.