By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,201 Members | 922 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,201 IT Pros & Developers. It's quick & easy.

Please tell am I using the correct logic for Data Navigation in ASP.Net 2.0..

P: n/a
Sam
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.

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.

Previously I posted several posts in this Forum for this issue,
unfortunately I did not receive any responses. Now, I came up with a
Solution 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.

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

Thank You....

Jul 27 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.