In my project user logs in the site with login.aspx page. Then user is redirecting to homepage (anasayfa.aspx)
User close the browser tab (not the browser) then user tries to open the site again and the page is default.aspx
Default.aspx is useless in my project. Host area needs a default.aspx, index.html like something and I added this default aspx.
After user close the browser tab, if he/she wants to open the site again, the first page must be his/her homepage not default.aspx
I didn't use asp.net membership provider or anything like that.
This is my login.aspx page code:
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
SqlConnection con = new SqlConnection();
con.ConnectionString = cnnstr;
SqlCommand cmd = con.CreateCommand();
cmd.CommandText = "Select Roles,UserId,UserName,Sifre,AccountType From ProfilBilgileri Where UserName = @txtLoginUserName AND Sifre = @txtLoginSifre and Durum=1";
View Complete Post