0

Hello,

I'm trying to write an asp.net app which searches a sql db and returns/updates the data.

I want to be able to hold the currently selected id of the item my user has selected. For example a doctors surgery would select a patient record then be able to browse the app without having to re-select that patient on each page.

What would be the best way to do this. Ideally I need to be able to get this ID application wide. the only thing i can think of is to create a public class, store the id and make it public but this seems quite messy :S

Thank you

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by kouroshnik
0

which Asp:control is shows Data?
usually data controls has a property named: dataKeyName.

If u use asp:dataControl u must set dataKeyName.
for example

<asp:GridView 
     ID="GridView1" 
     runat="server" 
     [U][B]DataKeyNames[/B][/U]="dr_id,dr_name,dr_family">
</asp:GridView>
0

remember that session states uses server memory.
that means session can reduce your server performance

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.