473,750 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Wizard Control IsPostBack and Method Issues

Two (hopefully) quick questions for you all:

1. Is there any way within a Wizard Step to programmaticall y determine
whether or not a postback has occurred? It appears as though, after the
first step, you are always posting back (which makes sense). However,
there are plenty of times when you would want to only execute code if
the Wizard Step is being loaded for the first time. I'm getting around
this by using some hidden fields, but there must be a better way.

2. Every time I load any step in my Wizard Control, the Load methods
for EVERY Wizard Step are being executed! Of course the content isn't
displayed for all of the steps, but all of the sql queries are being
run and I have to put conditionals everywhere to make sure nothing
bombs out (because the queries are expecting data from previous steps
etc). Again, something I'm missing, or is this by design? Why would all
of those Load methods be executed?

Thanks in advance for any help!

Rob

Dec 29 '05 #1
1 1680
Regarding #2 below, in case anyone else was as confused as I was (am):

Don't use the Load event for your steps, use the Activate event.
rd*****@gmail.c om wrote:
Two (hopefully) quick questions for you all:

1. Is there any way within a Wizard Step to programmaticall y determine
whether or not a postback has occurred? It appears as though, after the
first step, you are always posting back (which makes sense). However,
there are plenty of times when you would want to only execute code if
the Wizard Step is being loaded for the first time. I'm getting around
this by using some hidden fields, but there must be a better way.

2. Every time I load any step in my Wizard Control, the Load methods
for EVERY Wizard Step are being executed! Of course the content isn't
displayed for all of the steps, but all of the sql queries are being
run and I have to put conditionals everywhere to make sure nothing
bombs out (because the queries are expecting data from previous steps
etc). Again, something I'm missing, or is this by design? Why would all
of those Load methods be executed?

Thanks in advance for any help!

Rob


Dec 30 '05 #2

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

Similar topics

1
2324
by: Kris van der Mast | last post by:
Hi, been a while since I posted a question myself instead of trying to help others out. I'm refactoring an existing web app that uses dynamic loading of user controls and a lot of response.redirects to the same page. Because I hate the overhead by doing this I'm searching for a cleaner option. But I'm having troubles (off course or I wouldn't be posting this).
1
2588
by: Gopal Krish | last post by:
I'm have coded a simple menu (using link buttons as menu items) in a user control to be reused across many ASPX pages. In the page_load method I dynamically create the link buttons as follows LinkButton myLB = new LinkButton(); ......... .........
4
1941
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
0
2067
by: Bill Gauvey | last post by:
I have a wizard control on a page with the first two setps are static, created in the VS2005 UI; the remaining steps are created dynammically. For some reason I cant get it to retain in the viewstate. In the Page_Init I create the wizard steps. There will be 17 steps in all. protected void Page_Init(object sender, EventArgs e) { if (!IsPostBack) {
4
6854
by: Dabbler | last post by:
I have a Wizard control with each step using a user control. It seems the page_load of each user control is called everytime a postback event occurs in any step. Is there away to communicate to a user control that is it now the current "page" so I can restrict some of the initialization to occur only when the step is visible? I have a couple of controls that hit the database and don't want the overhead if the use isn't even looking at that...
5
21789
by: Nick Gilbert | last post by:
Hi, I'm using the asp:Wizard control and on some of the steps, I would only like the user to be able to progess to the next step by clicking an image button. Therefore I would like to be able to hide the Next button on these steps. Is there any way to do this? I know you can convert the navigation to a template, but this is a
2
1535
by: GaryDean | last post by:
In this event I can tell where I'm going via e.NextStepIndex but how can I tell where I am coming from? Do I have to setup Session and track it myself? -- Regards, Gary
8
10837
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList steps successfully with the following code... Control myContainer = (Control)Wizard1.FindControl("SideBarContainer"); DataList mySideBarList = (DataList)myContainer.FindControl("SideBarList");
3
5275
by: Allen Chen [MSFT] | last post by:
Hi Richard, Quote from Richard================================================== However I also want to be able to remove the panes. I have tried to include this, but find that when I first add the pane the remove event does not get handled, though thereafter it is handled without problems. ==================================================
0
9001
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8838
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9342
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6808
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4716
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4888
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.