Sorry, should have posted the code...
myConnectionString = new OleDbConnection();
myConnectionString.ConnectionString= "Provider=SQLOLEDB.1;database=PFA_Live;Server=xxxxxx;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False;uid=xxxxxxx;pwd=xxxxxxx;";
String rnSQL = "SELECT * FROM Refurb_View ORDER By ItemName ASC";
da = new OleDbDataAdapter(rnSQL, myConnectionString);
da.Fill(ds);
dt = ds.Tables[0];
myConnectionString.Close();
RefurbPartsListGrid.DataSource=dt;
RefurbPartsListGrid.DataBind();
}
void RefurbPartsListGrid_RowDataBound(Object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
{
HyperLink h = (HyperLink)e.Row.FindControl("lnkAddToCart");
h.NavigateUrl = String.Format("~/outlet/test.asp?AddPartNo={0}",e.Row.Cells[0].Text);
}
}
</script>
<asp:Content ContentPlaceHolderID="mainslot" runat="server" ID="main">
<table width="100%"><tr><td style="height: 116px">
<b><asp:literal ID="welcome" runat="server" Text="Welcome to the Pro-Face Outlet Store" /></b><br /><br />
<asp:GridView
ID="RefurbPartsListGrid"
runat="server"
AllowPaging="False"
EmptyDataText="No Parts Found"
AllowSorting="False"
Width="100%"
AutoGenerateColumns="False"
OnRowDataBound="RefurbPartsListGrid_RowDataBound">
<RowStyle CssClass="npbody" />
<HeaderStyle HorizontalAlign="Center" CssClass="npsubheader" />
<EmptyDataRowStyle CssClass="npemtpy" Height="50px" />
<Columns>
<asp:TemplateField HeaderText="nothing" >
<ItemStyle HorizontalAlign="Center" width="200px" height="200px"></ItemStyle>
<ItemTemplate>
<asp:literal ID="ItemCode" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ItemCode")%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Available Outlet Products" >
<ItemStyle HorizontalAlign="Center" width="200px" height="200px"></ItemStyle>
<ItemTemplate>
<img src='/outlet/images/<%# DataBinder.Eval(Container.DataItem, "U_XXDPFA_OutletPic") %>' alt="" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top"></ItemStyle>
<ItemTemplate>
<b>Part Number:</b> <asp:Literal ID="PartNo" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ItemCode") %>' visible="true"></asp:Literal><br /><br />
<b>Description:</b> <asp:Literal ID="PartDesc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ItemName") %>' visible="true"></asp:Literal><br /><br />
<b>Outlet Price:</b> <asp:Literal ID="PartPrice" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Price","{0:c}") %>' visible="true"></asp:Literal><br /><br />
<b>Quantity Available:</b> <asp:Literal ID="PartQty" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "OnHand","{0:F0}") %>' visible="true"></asp:Literal><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:HyperLink ID="lnkAddToCart" runat="server" ImageUrl="~/assets/common/icons/addtocart.gif" >Add To Cart.</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerSettings Position="TopAndBottom" Mode="Numeric" />
<PagerStyle HorizontalAlign="Right"></PagerStyle>
</asp:GridView>