D
David Colliver
Hi all,
I am setting up a tab strip in an aspx page. I am using
link buttons to switch between the tabs (at the moment,
it is just link buttons, no tabs...)
Under each link button, I intend to add a usercontrol. I
have written one so far. I am adding the UC dynamically
in the button click event of my tab strip.
I am also setting properties and calling a method in the
UC.
My UC is set up like a wizard using back and next buttons
to go backwards and forwards.
However, on the first page of the UC, if I click next, I
lose the control altogethor.
I am assuming that I probably need to hold the UC in the
viewstate somehow, but I don't know how to do that.
Also, if I switch tabs and load a different UC, will I
lose what has been entered in the UC that is no longer
being viewed?
Here is my code...
The ApplicationOverviewLinkButton is the one that will be
one of my tab buttons.
private void
ApplicationOverviewLinkButton_Click(object sender,
System.EventArgs e)
{
UserControl MyRegistration =
(UserControl)LoadControl
("../CMSUserControls/nqt/registration.ascx");
RegistrationDetailPanel.Controls.Add
(MyRegistration);
((MyCMSApp.CMSUserControls.nqt.registration)
MyRegistration).LoggedInUser = "LoggedInUserName";
((MyCMSApp.CMSUserControls.nqt.registration)
MyRegistration).FillData();
RegistrationDetailPanel.Visible =
true;
MyRegistration.Visible = true;
}
Thanks for any help.
Regards,
Dave Colliver.
http://www.IlfracombeFOCUS.com
~~
http://www,FOCUSPortals.com - Portal franchises available
I am setting up a tab strip in an aspx page. I am using
link buttons to switch between the tabs (at the moment,
it is just link buttons, no tabs...)
Under each link button, I intend to add a usercontrol. I
have written one so far. I am adding the UC dynamically
in the button click event of my tab strip.
I am also setting properties and calling a method in the
UC.
My UC is set up like a wizard using back and next buttons
to go backwards and forwards.
However, on the first page of the UC, if I click next, I
lose the control altogethor.
I am assuming that I probably need to hold the UC in the
viewstate somehow, but I don't know how to do that.
Also, if I switch tabs and load a different UC, will I
lose what has been entered in the UC that is no longer
being viewed?
Here is my code...
The ApplicationOverviewLinkButton is the one that will be
one of my tab buttons.
private void
ApplicationOverviewLinkButton_Click(object sender,
System.EventArgs e)
{
UserControl MyRegistration =
(UserControl)LoadControl
("../CMSUserControls/nqt/registration.ascx");
RegistrationDetailPanel.Controls.Add
(MyRegistration);
((MyCMSApp.CMSUserControls.nqt.registration)
MyRegistration).LoggedInUser = "LoggedInUserName";
((MyCMSApp.CMSUserControls.nqt.registration)
MyRegistration).FillData();
RegistrationDetailPanel.Visible =
true;
MyRegistration.Visible = true;
}
Thanks for any help.
Regards,
Dave Colliver.
http://www.IlfracombeFOCUS.com
~~
http://www,FOCUSPortals.com - Portal franchises available