D
djc
I currently have an asp.net detail page that is populated with data from a
sql 2000 table. Currently the user gets to this page by clicking on an ID
link from a different page so I know that ID does in fact exist. However I
am now adding a way for the user to enter in an ID into a textbox manually
and click a button to go directly to a particular ID. So now I need to
account for the user entering an ID that does not exist.
what is the recomended way to handle this common scenario in .net?
1) run the query and check a record count? then redirect to an error page
for the 'no records found' message?
2) let the functions on the page that are expecting the record fail and trap
the error, followed by redirecting to an error message page?
any info is appreciated. Thanks
sql 2000 table. Currently the user gets to this page by clicking on an ID
link from a different page so I know that ID does in fact exist. However I
am now adding a way for the user to enter in an ID into a textbox manually
and click a button to go directly to a particular ID. So now I need to
account for the user entering an ID that does not exist.
what is the recomended way to handle this common scenario in .net?
1) run the query and check a record count? then redirect to an error page
for the 'no records found' message?
2) let the functions on the page that are expecting the record fail and trap
the error, followed by redirecting to an error message page?
any info is appreciated. Thanks