
please it is after i click abutton that is when i can see the searched record yet i wanted to automatically display the values search in the gridview as i type it thanks
Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Logindata.aspx.vb" Inherits="OPAC.Logindata" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no" />
<style type="text/css">
.auto-style1 {
width: 100%;
}
.auto-style3 {
width: 242px;
}
.auto-style4 {
width: 474px;
height: 140px;
}
.auto-style5 {
background-color: #FFFFFF;
}
.auto-style7 {
width: 460px;
height: 140px;
}
.style8 {
color: #00FF00;
font-weight: bold;
font-size: 36px;
font-family: Georgia, "Times New Roman", Times, serif;
}
.auto-style8 {
color: #00FF00;
font-weight: bold;
font-size: 36px;
font-family: Georgia, "Times New Roman", Times, serif;
text-align: center;
}
.auto-style9 {
background-color: #66CCFF;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://rawgit.com/tobia/Pause/master/jquery.pause.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery.marquee/1.3.1/jquery.marquee.min.js"></script>
<script type="text/javascript">
$(function () {
$('#style1').marquee({
duration: 10000
});
});
</script>
</head>
<body>
<form id="form1" runat="server" class="auto-style9">
<div>
<table class="auto-style1">
<tr>
<td colspan="6" class="auto-style8">
<div id="style1">ON LINE CATALOGUE</div>
</tr>
<tr>
<td>
<img alt="" class="auto-style7" longdesc="http://localhost:1113/Images/mm_entertainment_image.jpg" src="Images/mm_entertainment_image.jpg" /></td>
<td colspan="4" class="auto-style5">
<asp:Login ID="Login3" runat="server" CssClass="auto-style2">
<LayoutTemplate>
<table cellpadding="1" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td>
<table cellpadding="0">
<tr>
<td align="center" colspan="2">Log In</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Client Account:</asp:Label>
</td>
<td>
<asp:TextBox ID="UserName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">PassCode:</asp:Label>
</td>
<td>
<asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td colspan="2">
<asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." />
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color:Red;">
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr>
<td align="right" colspan="2">
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="Login1" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</LayoutTemplate>
</asp:Login>
</td>
<td>
<img alt="" class="auto-style4" longdesc="http://localhost:1113/Images/mm_entertainment_image.jpg" src="Images/mm_entertainment_image.jpg" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td class="auto-style3"> </td>
<td> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
Code:
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Public Class SearchAgain
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Dim constr As String = ConfigurationManager.ConnectionStrings("SLISConnectionString").ConnectionString
Using con As SqlConnection = New SqlConnection(constr)
Using cmd As SqlCommand = New SqlCommand("SELECT * FROM Stockkabojja", con)
Using sda As SqlDataAdapter = New SqlDataAdapter(cmd)
cmd.CommandType = CommandType.Text
Dim dt As DataTable = New DataTable()
sda.Fill(dt)
gvCustomers.DataSource = dt
gvCustomers.DataBind()
rptCustomers.DataSource = dt
rptCustomers.DataBind()
End Using
End Using
End Using
End If
End Sub
End Class