[code=vbnet]
If Not IsPostBack Then
If Not Session("USERID ") Is Nothing Then
If String.Compare( Session("ROLE") , "Retailer") = 0 Then
strUSERID = Session("USERID ")
Else
Response.Redire ct("usercp.aspx ")
End If
Else
Response.Redire ct("UserLogin.a spx")
End If
FillBrands()
End If
[/code]
the above code works fine page is not expiring until sign out but server side action on page like loading data on dropdownlist not working.
as i am loading brands in one dropdownlist and when we choose any brand from the list it will load product names in another dropdownlist which is not happening if i use above code. but the problem of session expire is not happening with this code. just clarify me that which method is true code to check the login and role should be kept inside if not ispostback then .... end if or outside.
If Not IsPostBack Then
If Not Session("USERID ") Is Nothing Then
If String.Compare( Session("ROLE") , "Retailer") = 0 Then
strUSERID = Session("USERID ")
Else
Response.Redire ct("usercp.aspx ")
End If
Else
Response.Redire ct("UserLogin.a spx")
End If
FillBrands()
End If
[/code]
the above code works fine page is not expiring until sign out but server side action on page like loading data on dropdownlist not working.
as i am loading brands in one dropdownlist and when we choose any brand from the list it will load product names in another dropdownlist which is not happening if i use above code. but the problem of session expire is not happening with this code. just clarify me that which method is true code to check the login and role should be kept inside if not ispostback then .... end if or outside.
Comment