cusimar9
04-16-2007, 06:43 AM
I have a form which uses a detailsview to display information about a property, depending on a user's input. This uses a stored procedure to retrieve the record.
The primary key for the record is stored when a record is displayed.
If the user navigates away from the page, then goes back, I want the page to display the last known record, not just wait for user input.
So basically I want
<SelectParameters>
<% if Session("PropertyCode") <> "" then use this value, else wait for user input %>
</SelectParameters>
Any suggestions? I've read somewhere that one way to do it would be to declare both ControlParameters, then when the page loads, dynamically remove whichever ControlParameter we don't want to use, however I'm struggling to write the code for this.
The primary key for the record is stored when a record is displayed.
If the user navigates away from the page, then goes back, I want the page to display the last known record, not just wait for user input.
So basically I want
<SelectParameters>
<% if Session("PropertyCode") <> "" then use this value, else wait for user input %>
</SelectParameters>
Any suggestions? I've read somewhere that one way to do it would be to declare both ControlParameters, then when the page loads, dynamically remove whichever ControlParameter we don't want to use, however I'm struggling to write the code for this.