First of all, don't use inline queries like this. This leads to SQL Injection attack. Use Parameterized queries instead.
No need to use
DataAdapter
, as you are reading only one value. You can use
DataReader
.
Then debug your code and see what is happening. You have already coded for redirection. Isn't it working?
To store values in Session, you can do like...
Session["SomeName"] = "someValue";