If my primary key is a guid, then I use querystring.
If my primary key is an int, I go to the Session route.
EmpID=123 is too easy to change to EmpID = 124 ......in my world.
http://sholliday.spaces.live.com/?_c...26ayear%3d2005
I have a Session Wrapper object.
On the page1, I put a small object into my wrapper object.
On page2, I have both an indexer and .Remove method. I use the .Remove
method. That way I get the value, but don't orphan it.
The object I put into the SessionWrapper is small. Usually just an int.
I also have an abstract class, which I inherit from. The abstract class has
"EditMode" ... which is an enum with 2 values. AddNew and Edit(Existing)
This way, I can decide on the SomethingEdit.aspx page.... whether I'm adding
a new one or editing an existing one, without a bunch of weirdo logic saying
if (empid == null) || (empid<=0)
I have an enum value which tells me.
.......
If I was edting an employee. I'd extend the abstract class, and add an EmpID
property
EmpArg : MyBaseEditModeClass
--EditMode
--EmpId
Anyway. Its a little complex at first, but I like it.
If youre using guids
EmpEdit.aspx?empuuid=0E139585CE5542d985098C7898FB4 CF8
Then odds are, no one is going to guess another empuuid
<db******@progressive.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
This may be a can of worms but I wanted to throw it out here. I am
gathering pros and cons for using querystring vs session variables for
passing row keys in a ASP.net application. I want to be as thorough as
possible so why not throw out this situation to the development
community. Thoughts and opinions are appreciated.