Ask a Question related to ASP.NET General, Design and Development.
-
John #1
Repost : Viewstate being maintained second time around
Hi all,
I have a problem with viewstate being maintained. I use LoadControl to load
a user control and the data is sent down to the client correctly. However,
when I change some data and post it, the viewstate does not seem to load for
the user control upon sending it back down to the client. If I change the
data again, then the viewstate DOES seem to be maintained.
What gives?
Regards
John Guest
-
Failed to load viewstate. The control tree into which viewstate...
Hi to all, I have a webform.aspx and inside i have a dropdown list with autopostback and a place holder... Depending of the selected index... -
Repost: Getting Project Folder during Design Time
I was given the following code in response to a request to retrieving the Web Root for a Project while at design time. However this does not do what... -
Viewstate only being maintained second time around
Hi all, I have a problem with viewstate being maintained. I use LoadControl to load a user control and the data is sent down to the client... -
User-maintained MQT
Has anybody used user-maintained Materialized Query Tables?, I'm trying to use the latest DB2 8.1 MQT functionality where you can INSERT, UPDATE or... -
in LoadViewState() : ViewState is empty after page reloads the 2nd time
Hi, I have a Webform with 1 submit button and 1 label code behind : public class MainWebForm: System.Web.UI.Page { protected... -
HrtgSkr #2
Re: Repost : Viewstate being maintained second time around
John -
I had quite a bit of trouble getting a usercontrol to work when the
usercontrol included webcontrols that I wanted to interact with the
parent.
The best way I found to work is to drag the usercontrol onto the
parent, then toggle the visible property, rather than using
LoadControl.
My web page is in GridLayout, so I programmatically move it to
position when it's changed to visible = true.
I also found that ViewState wasn't working. I found an usercontrol
example that showed removing the OnInit() function in the usercontrol
and replacing it with
public void Page_Init(object sender, EventArgs e)
{
InitializeComponent();
}
** I'm not sure why the example used this method. It seems like you
could just remove the base.OnInit(e) for the Designer generated code,
but I didn't try that.
Then, in the parent, add
this.Init += new System.EventHandler(this.ctlAddNewRule.Page_Init);
(** Mine is in C#, I'm not sure how to do it in VB)
I have this usercontrol on several pages, and it is working
consistently.
Dawn.
"John" <a@b.com> wrote in message news:<ebUlf2bWDHA.3232@tk2msftngp13.phx.gbl>...> Hi all,
>
> I have a problem with viewstate being maintained. I use LoadControl to load
> a user control and the data is sent down to the client correctly. However,
> when I change some data and post it, the viewstate does not seem to load for
> the user control upon sending it back down to the client. If I change the
> data again, then the viewstate DOES seem to be maintained.
>
> What gives?
>
> RegardsHrtgSkr Guest



Reply With Quote

