473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

XML control not maintaining contents after postback, even with EnableViewState=true

I have a webform that lists search results using an XML control

The search results are contained in a string called strResults and are transformed using an xsl file into formatted results.

The c# code is as follows:

XslTransform trans2 = new XslTransform();
trans2.Load(Server.MapPath("HitList.xsl"));
xmlSearchResults.DocumentContent = strResults;
xmlSearchResults.Transform = trans2;

This works fine, but I want to be able to do a postback whilst maintaining the search results using viewstate.

If I enable viewstate the xml control is empty after the postback.

Other controls on the form successfuly return their viewstate so everything else appears to be working.

Any ideas anybody?

Thanks

Justin Crossley
Nov 18 '05 #1
0 1012

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Jim H | last post by:
We ahve a .NET web page that we dynamically create a bunch of DataGrids and add them to a place holder. When the user hits submit we need to go through all of the DataGrids to get some data. We...
4
by: Gill Smith | last post by:
After setting the web control text box enable property to FALSE makes the control to loose the data between round trip. I am making sure that the property - EnableViewState = TRUE. Same code...
3
by: Guadala Harry | last post by:
I have a simple user control (see below) that has EnableViewState="true". I place it on an ASPX page at runtime using a PlaceHolder - which also has EnableViewState="true". After a postback, the...
13
by: Chris Thunell | last post by:
I have created several grids dynamically and have added them to different HTML placeholders on a vb.net web form. The grids and controls within them come up and view beautifully when the web page...
1
by: olduncleamos | last post by:
Hello all, I am experimenting with the repeater control and ran into something that I wasn't expecting. I would appreciate if the experts can confirm or correct my understanding. Here is a...
1
by: Gunjan Garg | last post by:
Hello All, I am working to create a generic datagrid which accepts a datasource(ListData - This is our own datatype) and depending on the calling program customizes itself for sorting,...
0
by: fernandezr | last post by:
Hi, I've got a user control that is referenced twice on the same page and I'd like to access the textbox values on postback so I can update a database. How can get the values for each instance of...
4
by: Jimmy M | last post by:
I've got a page that generates dropdowns and text boxes based on database data. I have them all set to auto-postback because I'll be using this with Atlas to make a more seamless user experience....
1
by: Sami Rehman | last post by:
Hi, I am creating some web user controls dynamically Using LoadControl("ABC.ascx") My user control contains 2 drop down list, 2nd one is loaded based on the selection in the 1st one. However...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.