DotNetDunce
Programmer
jbenson001, please accept my apology. I had a major brain fart and I guess my last post in my previous thread caused it to where I could not repost in it. I do appreciate your help and if you will overlook my stupidity. I'm placing the correct code here in this thread.
Thanks again for your help,
Melinda
Thanks again for your help,
Melinda
Code:
<%@ Page Language="VB" MasterPageFile="MasterPage.master" AutoEventWireup="false" CodeFile="Search.aspx.vb" Inherits="Search2" title="Search" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<hr style="width: 782px" />
<asp:TextBox ID="txtSearch" runat="server" Font-Names="Arial"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="Search" Font-Names="Arial" />
<asp:Label ID="lblUserType" runat="server" Visible="False" Font-Names="Arial"></asp:Label><br />
<br />
<asp:Label ID="lblNoRecs" runat="server" Font-Bold="True" ForeColor="Red" Text="No Records Found"
Visible="False" Font-Names="Arial"></asp:Label><br />
<asp:GridView ID="GridView1"
runat="server"
AutoGenerateColumns="false"
AllowSorting="true"
AllowPaging="true"
OnSorting="GridView1_Sorting"
EnableViewState="true" Font-Names="Arial">
<HeaderStyle BackColor="Blue" ForeColor="White" />
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="ticketno" HeaderText="Ticket Number" InsertVisible="False"
SortExpression="ticketno" DataNavigateUrlFormatString="detail.aspx?ticketno={0}" DataTextField="ticketno">
<ItemStyle HorizontalAlign="Center" />
</asp:HyperLinkField>
<asp:BoundField DataField="lname" HeaderText="Last Name" SortExpression="lname">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="company" HeaderText="Company" SortExpression="company" >
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="product" HeaderText="Product" SortExpression="product" >
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="date_entered" HeaderText="Date Entered" SortExpression="date_entered" DataFormatString="{0:d}" HtmlEncode="False" >
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="assigned" HeaderText="Assigned To" SortExpression="assigned" >
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="status" HeaderText="Status" SortExpression="status" >
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
</asp:GridView>
</asp:Content>