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

S

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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top