Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing from FAT client to THIN client

Status
Not open for further replies.

Firecat1970

IS-IT--Management
May 25, 2003
68
HK
Dear experts,

I am from Classic ASP age, and I am facing some technical difficulty in using ASP.NET to implement similar thing I did in ASP.

What I did in ASP was :
On my page, I have 2 tables both binding to 2 XML objects, and of course the tables have pagination support.
Functionally, users can move rows from Table1 to Table2 or vice-versa, when user click the 'save' button on the page, it sends the 2 XML objects back to a server side ASP for persistence to Database.

What difficulty I have in ASP.NET is :
I try to implement 2 GridViews (with pagination) which bind to 2 Typed Collection objects.
I want the same functionality, so that users can move row from Grid1 to Grid2 or vice-versa....
It seems to me that the only way I can do it, is to persist every single row-move back to the database, am I correct?

Please help me. Thank you.
 
>>It seems to me that the only way I can do it, is to persist every single row-move back to the database, am I correct

why not use ViewState? that will persist till that page is closed...

Known is handfull, Unknown is worldfull
 
THanks for your reply.

I am rather new to ASP.NET. If I have a 10 pages Datagrid, when I am seeing page 2, the viewstate is only hold page 2 context. When I make changes to a row in page 2, and I don't persist it back to Database, and I change to page 10, and I change again back to page 2, is the changes still there? My guess is no.
 
you are correct.

however, you can save custom variables also in viewstate. Therefore you can have an array that records these cahnges and save the Array in the viewstate. therefore on clicking "Save" only the array dat needs to be saved...

Known is handfull, Unknown is worldfull
 
Yes, I see the ability to store custom variables in viewstate... if I have 100 rows, does it mean the viewstate of these 100 rows are passing back and forth between postback? In my business, I at most have 200+ rows, and each rows is about a few hundreds bytes.

Hum... maybe db persisting at every row changes is easier?
 
>> if I have 100 rows, does it mean the viewstate of these 100 rows are passing back and forth between postback?

yes it will, but you will be saving only changed data right?


>>Hum... maybe db persisting at every row changes is easier?

in that case there is no need for a "Save" button concept. lets say the user wants to save all at one go?

the idea of using viewstate is:
1. Only one hit to DB.
2. Transaction type processing (save all at one go or dont save anything at all).

i leave it tou you to decide...

Known is handfull, Unknown is worldfull
 
>> yes it will, but you will be saving only changed data right?

Hum.. actually I want to mimic the existing behaviour, so users can update anything to each row, and those changes are visible (in Grid) throughout the page lifecycle... but it seems I was not doing things to proper way for using FAT client mentality, and I have to learn to accept the limitation of a true thin client way. :)

I will do a prototype and try out the performance issue, then I will share with friends here.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top