Q:

Use parameters to pass data between pages or extract it again from database?

I am new to ASP.NET and I wonder which would be better? Should I use parameters to pass the value of a field from the database which I have extracted in the current page between pages and get it by Request.Params["abc"] or it would be better if I pass only the ID of the object and then extract it again in the other page from the database? 
For exmaple, I need to show the name of a specialty in AnotherPage.aspx. I already have extracted the whole specialty object from the database in SomePage.aspx because I need it there. The question is which of the following is the better approach?
www.mysite.com/AnotherPage.aspx?specialtyId=2
www.mysite.com/AnotherPage.aspx?specialtyName="Methematics"
What are the advantages and disadvantages of the two methods?
Thank you very much in advance!

A:

From a clean URL perspective, it's better to just pass the ID. But even then, you'd want to make it nicer. Instead of...
www.mysite.com/AnotherPage.aspx?specialtyId=2

You'd want
www.mysite.com/Specialties/2

You can do that with URL Rewriting.
Now, that begs the question, what do you do with the data for each Specialty object? You could load that from the database on each request. I'd do that. Then, if performance suffers you might consider caching.

