SHARE
TWEET

FrmBrowseMahasiswaCookies.aspx

a guest Jul 17th, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Imports System.Data.OleDb
  2. Imports System.Data
  3. Imports System.Data.SqlClient
  4. Imports System.IO
  5. Imports System.Net
  6.  
  7. Public Class FrmBrowseMahasiswaCookies
  8.     Inherits System.Web.UI.Page
  9.  
  10.     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  11.         Using conn As New SqlConnection(ConfigurationManager.ConnectionStrings("constr").ToString())
  12.             Dim dsPerson As New DataSet()
  13.             Dim strSelectCmd As String = "SELECT * from mahasiswa"
  14.             Dim da As New SqlDataAdapter(strSelectCmd, conn)
  15.             conn.Open()
  16.             da.Fill(dsPerson, "mahasiswa")
  17.             Dim dvPerson As DataView = dsPerson.Tables("mahasiswa").DefaultView
  18.             GVMahasiswa.DataSource = dvPerson
  19.             GVMahasiswa.DataBind()
  20.         End Using
  21.     End Sub
  22.  
  23.     Protected Sub GVMahasiswa_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GVMahasiswa.SelectedIndexChanged
  24.         Dim name As String = GVMahasiswa.SelectedRow.Cells(0).Text
  25.         Session("BrowseMahNIM") = ""
  26.         Dim VNIM As String = TryCast(GVMahasiswa.SelectedRow.FindControl("lblNIM"), Label).Text
  27.  
  28.         If Session("BrowseMahNIM") Is Nothing Or Session("BrowseMahNIM") = "" Then
  29.             Session("BrowseMahNIM") = VNIM
  30.         Else
  31.             VNIM = Session("BrowseNIS")
  32.         End If
  33.  
  34.         Response.Redirect("FrmEditmahasiswa.aspx")
  35.     End Sub
  36. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top