Click here to Skip to main content
15,894,539 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: APPLICATION TO RUN EVERY FEW SECONDS Pin
Vasudevan Deepak Kumar21-Feb-08 19:19
Vasudevan Deepak Kumar21-Feb-08 19:19 
GeneralRe: APPLICATION TO RUN EVERY FEW SECONDS Pin
hartertobak21-Feb-08 9:13
hartertobak21-Feb-08 9:13 
GeneralRe: APPLICATION TO RUN EVERY FEW SECONDS Pin
hartertobak21-Feb-08 9:16
hartertobak21-Feb-08 9:16 
GeneralRe: APPLICATION TO RUN EVERY FEW SECONDS Pin
J4amieC21-Feb-08 22:41
J4amieC21-Feb-08 22:41 
QuestionWorking with large datasets and filtering Pin
Member 438223221-Feb-08 3:38
Member 438223221-Feb-08 3:38 
GeneralRe: Working with large datasets and filtering Pin
Not Active21-Feb-08 5:17
mentorNot Active21-Feb-08 5:17 
GeneralRe: Working with large datasets and filtering Pin
Member 438223221-Feb-08 19:25
Member 438223221-Feb-08 19:25 
GeneralMultiView and View [modified] Pin
c242321-Feb-08 3:36
c242321-Feb-08 3:36 
Hi! I'm doing a project where I need to generate at run time new View controls inside a MultiView control. The Views generated are based on data pulled from an Xml file, so it must be done at runtime. Additionally I have a command button for each View - when I click on the first button, the first view should show...

So far I have written the code to generate these at runtime (the code is in a Page_Load event), and the first button I click on shows the correct View with no problem. However when I click a second button I get the following error message:

"
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: ActiveViewIndex is being set to '0'. It must be smaller than the current number of View controls '0'. For dynamically added views, make sure they are added before or in Page_PreInit event.
Parameter name: value "

I understand that this is saying that my code to generate views should not be in Page_Load, but should instead be in Page_PreInit, and when I have run tests moving the code It has worked with no problem.

HOWEVER..... I have the constraint that I am trying to do all of this inside a Web User Control, which does not have a Page_PreInit event (this is so that I can use the component in a DNN module later)

Does anybody know of a work around for this?

Thanks in advance,
Chris

modified on Thursday, February 21, 2008 10:51 AM

GeneralRe: MultiView and View Pin
Venkatesh Mookkan21-Feb-08 16:05
Venkatesh Mookkan21-Feb-08 16:05 
GeneralRe: MultiView and View Pin
c242322-Feb-08 5:07
c242322-Feb-08 5:07 
Questionparent and pop up window records Pin
Sonia Gupta21-Feb-08 2:27
Sonia Gupta21-Feb-08 2:27 
GeneralRe: parent and pop up window records Pin
Christian Graus21-Feb-08 9:22
protectorChristian Graus21-Feb-08 9:22 
Generaldatarelation Pin
niki_nilu21-Feb-08 1:54
niki_nilu21-Feb-08 1:54 
GeneralRe: datarelation Pin
Not Active21-Feb-08 2:27
mentorNot Active21-Feb-08 2:27 
GeneralRe: datarelation Pin
niki_nilu21-Feb-08 3:16
niki_nilu21-Feb-08 3:16 
GeneralRe: datarelation Pin
Not Active21-Feb-08 3:46
mentorNot Active21-Feb-08 3:46 
GeneralRe: datarelation Pin
niki_nilu21-Feb-08 20:25
niki_nilu21-Feb-08 20:25 
GeneralRe: datarelation Pin
Not Active22-Feb-08 2:25
mentorNot Active22-Feb-08 2:25 
QuestionUpload files from client machine to server Pin
MayyMagdy21-Feb-08 0:46
MayyMagdy21-Feb-08 0:46 
GeneralRe: Upload files from client machine to server Pin
hartertobak21-Feb-08 9:27
hartertobak21-Feb-08 9:27 
GeneralPlz help me abt login controls [modified] Pin
Member 387988121-Feb-08 0:10
Member 387988121-Feb-08 0:10 
QuestionProblem with Sessions Pin
kolag21-Feb-08 0:10
kolag21-Feb-08 0:10 
QuestionNew Features in 3.5 [modified] Pin
Kuricheti20-Feb-08 23:42
Kuricheti20-Feb-08 23:42 
GeneralRe: New Features in 3.5 Pin
Not Active21-Feb-08 2:18
mentorNot Active21-Feb-08 2:18 
GeneralRe: New Features in 3.5 Pin
Kuricheti21-Feb-08 4:51
Kuricheti21-Feb-08 4:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.