Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 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 July 27th, 2006, 03:01 PM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please tell am is it correct logic for Navigation?

I am fairly new to ASP. Net 2.0, background MS Access 2000/2003 and
working knowledge of SQL 2000.

Scenario:


Page1:


Blank Page loads with 2 Text Boxes (TxtLast, TxtFirst), a Command
Button (CmdSearch) and a Gridview to Display result Data (4 Columns:
Select but Text is: Show Details, Unique Record ID, Last Name and First Name).


Work Flow:
users enter Data in TxtLast, TxtFirst and Click CmdSearch.
If Records are found, matching results are displayed in Gridview
(Based on Search Criteria). There may be multiple Names in Gridview.
Users then Click Select (Show Details) in Gridview. Page 2 is then
Invoked with Unique Record as Query String Parameter.


Page2:


A FormView with Detail Information(i.e. Phone#, Address, City, State
etc.). There users can edit, Update each Detail Record. Outside
Gridview, I have a Command Button (CmdGoPage1) to return to Page1 after users are done with Page2. I am using Response.Redirect "Page1") for CmdGoPage1_Click event because that's what all I know with my limited knowledge.

Problem:

All these logic works fine except when Page1 is reloaded after Response redirect from Page2, all Data in Gridview1 of Page1 are lost, also TxtLast and TxtFirst Text Boxes are null (The same State as it was loaded very first time).


Now users have to re-search again in Page1 by using TxtLast and
TxtFirst to retrieve the original results. That's not what is my
intention. I would like to see after Page1 is post backed from Page2, it should not loose any values in Gridview. If users try to find another name, only then they need to re-search in Page1.


Now, I came up with a Solution (I do not like but I got no choice) by Using Multiview with 2 Separate Views (for Page1 and Page2). They work fine, I do not loose values between Page Navigations but I have to put all Codes of Page1 and Page2 in a single huge Page. I
noticed it will be cumbersome to debug as I add more pages in my
Project (I still have to add 4 more pages that are all dependant of
Page 1). Also I really do not know what will be the overall
performance.


My question is that am I using right logic by using MultiView? Or is there any way I can accomplish the same result by using separate Pages. But I still need navigation bars to Navigate between Pages. I did this type of developments easily in MS Access by using Tab Strips/Pages and subforms. Can I use MS Access like logics in ASP.net to accomplish the same result?

Any suggestion or a guide (Example, URL or Book Name) for this issue
will be highly appreciated...


Thank You....




 
Old July 31st, 2006, 04:36 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

MutiView is an option however as i see you dont have to many values that you need to preserve so you can use the session state to stote the value of first and the last name and call the search function on the page load if these value are NOT NULL. you can also use Serevr.Transfer instead of Respose.Redirect to avoid a round trip.







Similar Threads
Thread Thread Starter Forum Replies Last Post
help to solve the logic pradeepn XSLT 4 May 22nd, 2007 06:07 AM
And/Or Logic??? ninel SQL Server 2000 2 February 9th, 2007 11:33 AM
RECURRING LOGIC its.shashank Classic ASP Databases 1 November 22nd, 2006 08:58 AM
Tricky logic (for me) cedwards Dreamweaver (all versions) 5 April 5th, 2006 04:47 PM
Mixing Data access logic and business logic polrtex BOOK: Professional Jakarta Struts 0 December 15th, 2003 07:19 PM





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