Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2007, 03:36 PM
Authorized User
 
Join Date: Feb 2007
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Default C# WinForm :Accessing State Value using UIP

Hi,
     Appliation uses Microsoft User Interface Block for views navigation and state management. I am able to access View1 value from View2 using controller state mechanism if use same navigation graph e.g

this.Navigator.CurrentState.NavigateValue=navigate Value;
Navigate(); ( at this point all values from View1 are already in state and moving ahead on same navigation graph)

and access value from View2 using

MyController.State["CustomerGUID"] ( at this point View 2 overlap view1 and open in same tab)


    But if i change Navigation graph when user click View1 (which open View 2 in separate Tab insted of overlapping View 1)using "OnStartTask" e.g

this.OnStartTask("LoadCustomeprofileSummeryView",n ew TaskArgumentsHolder(this.State.TaskId, this.State.NavigationGraph, alData),null);
 (where alData is arraylist in which i keep View 1 values
  LoadCustomeprofileSummeryView - New Navigationgraph Name in UIP
                                  config xml. )

  Note i have mentioned "StartView(View2)" namd in that new graph)

 so when i try to access values from View 2 in second case, i am unable to get value and my controller state is null. In both case i have same controller.

  Does any one have idea how to get value in second case or is it possible to get values from

 One NavigationGraph to another one.

Thanks a lot for any tiny help...

Regards,
Maulik



 
Old June 1st, 2007, 11:28 AM
Authorized User
 
Join Date: Feb 2007
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I found solution for this.Its "EnterTask" method of base controller class which i need to override in view2's Controller and in that i have to mention New Navigation graph value and set parameter from view1 ( which i want to pass in View2 as arraylist) and set in view2's controller's state. thats all and it works like charm....






Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading a WinForm using at Runtime ashu_from_india General .NET 0 October 3rd, 2006 04:04 AM
Session State|View State|Do I have other options? rockon ASP.NET 1.x and 2.0 Application Design 2 October 5th, 2005 07:10 PM
WinForm and Sharepoint natarajan_ve .NET Web Services 0 July 28th, 2005 05:35 AM
Disposing a WinForm in Excel Bowmangotti VB.NET 2002/2003 Basics 0 October 5th, 2004 10:13 PM
Login WinForm in C# newkid82 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 September 3rd, 2004 09:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.