You are on page 1of 1

Dim objc As New commonutility() Dim str As String = Nothing Public Sub role() Try str = (("select value

from role_sro where dcode='" + Session("dc ode") & "' and srocode='") + Session("srocode") & "' and usercode='") + Session( "user") & "'" Dim role As String = obj.Fatch_Col(str, Session("dcode").ToStrin g()) Dim c_role As String = HttpContext.Current.Request.Cookies("role ").Value If c_role <> role Then HttpContext.Current.Response.Redirect("../sro/Default.as px") Else fixSess() End If 'Me.lbl_msg.Text = "Connection Failed" Catch ex As Exception End Try End Sub Public Sub fixSess() Dim rnd As New Random() Dim Rstr As String = rnd.[Next]().ToString() 'HttpContext.Current.Response.Cookies("sstrxoo").Value = Rstr 'HttpContext.Current.Session["sstrxoo"] = Rstr HttpContext.Current.Response.Cookies("role").Value = Rstr str = ((("update role_sro set value='" & Rstr & "' where dcode='") + Ses sion("dcode") & "' and srocode='") + Session("srocode") & "' and usercode='") + Session("user") & "'" objc.Exe_Query(str, Session("dcode").ToString()) End Sub role()

You might also like