Hi,
I am new to VWD and don't have much experience with it. I am trying to create a page that displays a gridview. The grid object obtain data from a query to a table in VisualFoxpro accesed via ODBC. The query was created with the "Configure Data Source" wizard of the object and includes a WHERE statement with a parameter obtained from the http string. I have tried many ways but it just doesn't seem to work, always returns a "blank" page when previewed. I checked the url string and it does have the correct parameter name and value. Anybody could please help me find out what is wrong or have an alternate solution to passing parameters from one page to another ??? Below is the code for the gridview page. Thanks a lot.
<%@ Page Language="
VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim cual_invent As Integer = Page.Request.QueryString("InventID")
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Detalle de Inventario</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<br />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
<Columns>
<asp:BoundField DataField="inventario" HeaderText="inventario" SortExpression="inventario" />
<asp:BoundField DataField="orden" HeaderText="orden" SortExpression="orden" />
<asp:BoundField DataField="partno" HeaderText="partno" SortExpression="partno" />
<asp:BoundField DataField="descrip" HeaderText="descrip" SortExpression="descrip" />
<asp:BoundField DataField="umedida" HeaderText="umedida" SortExpression="umedida" />
<asp:BoundField DataField="cantidad" HeaderText="cantidad" SortExpression="cantidad" />
<asp:BoundField DataField="peso" HeaderText="peso" SortExpression="peso" />
<asp:BoundField DataField="porder" HeaderText="porder" SortExpression="porder" />
<asp:BoundField DataField="location" HeaderText="location" SortExpression="location" />
<asp:BoundField DataField="saldo" HeaderText="saldo" SortExpression="saldo" />
<asp:BoundField DataField="origen" HeaderText="origen" SortExpression="origen" />
<asp:BoundField DataField="marca" HeaderText="marca" SortExpression="marca" />
<asp:BoundField DataField="modelo" HeaderText="modelo" SortExpression="modelo" />
<asp:BoundField DataField="serie" HeaderText="serie" SortExpression="serie" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:Trafico_Conctn %>"
ProviderName="<%$ ConnectionStrings:Trafico_Conctn.ProviderName %>" SelectCommand="SELECT * FROM [inv_detail] WHERE ([descrip] = ?)">
<SelectParameters>
<asp:QueryStringParameter Name="descrip" QueryStringField="InventID" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<br />
<br />
</div>
</form>
</body>
</html>