بسم الله الرحمن الرحيم
السلام عليكم ورحمة الله وبركاته
اخواني عندي مشكلة في GridView وهي لاتظهر البيانات المراد البحث عنها ولا اعلم
هل المشكلة في الاستعلام او ماذا ؟ وماهي طريقة طباعتها؟
وهذا كود الصفحة
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
width: 100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="style1" dir="rtl">
<tr>
<td style="text-align: center">
<asp:Label ID="Label1" runat="server"
style="color: #0000CC; text-align: center; font-weight: 700; font-size: large"></asp:Label>
</td>
</tr>
<tr>
<td style="font-weight: 700; color: #0000CC">
للبحث عن عقار</td>
</tr>
<tr>
<td>
<asp:SqlDataSource ID="ds" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT Property_Type, Schema_Name, Part_Number, Plot, Price, City_Property, Picture_Property, Property_ID FROM Property WHERE (State_Property = @State_Property) OR (Schema_Name = @Schema_Name) OR (Part_Number = @Part_Number) OR (Property_Type = @Property_Type) OR (City_Property = @City_Property)">
<SelectParameters>
<asp:Parameter DefaultValue="معروض" Name="State_Property" Type="String" />
<asp:ControlParameter ControlID="name" Name="Schema_Name" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="number" Name="Part_Number" PropertyName="Text"
Type="Int32" />
<asp:ControlParameter ControlID="type" Name="Property_Type"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="citey" Name="City_Property"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</td>
</tr>
<tr>
<td>
نوع العقار: <asp:DropDownList ID="type" runat="server">
<asp:ListItem>هل هو</asp:ListItem>
<asp:ListItem>ارض</asp:ListItem>
<asp:ListItem>فلة</asp:ListItem>
<asp:ListItem>عمارة</asp:ListItem>
<asp:ListItem>استراحة</asp:ListItem>
<asp:ListItem>شقة</asp:ListItem>
<asp:ListItem>محطة وقود</asp:ListItem>
<asp:ListItem>قصر</asp:ListItem>
<asp:ListItem>مزرعة</asp:ListItem>
<asp:ListItem>محلات</asp:ListItem>
<asp:ListItem>مستودعات</asp:ListItem>
</asp:DropDownList>
المدينة<asp:TextBox ID="citey" runat="server"></asp:TextBox>
اسم المخطط/الحي
<asp:TextBox ID="name" runat="server"></asp:TextBox>
رقم القطعة
<asp:TextBox ID="number" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td style="text-align: center">
<asp:Button ID="Button1" runat="server" Text="بــحــث" />
</td>
</tr>
<tr>
<td>
<div>
</div>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AutoGenerateColumns="False" BackColor="White" BorderColor="#3366CC"
BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="Property_ID"
DataSourceID="ds" style="text-align: center">
<RowStyle BackColor="White" ForeColor="#003399" />
<Columns>
<asp:BoundField DataField="Property_Type" HeaderText="Property_Type"
SortExpression="Property_Type" />
<asp:BoundField DataField="Schema_Name" HeaderText="Schema_Name"
SortExpression="Schema_Name" />
<asp:BoundField DataField="Part_Number" HeaderText="Part_Number"
SortExpression="Part_Number" />
<asp:BoundField DataField="Plot" HeaderText="Plot" SortExpression="Plot" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
<asp:BoundField DataField="City_Property" HeaderText="City_Property"
SortExpression="City_Property" />
<asp:BoundField DataField="Picture_Property" HeaderText="Picture_Property"
SortExpression="Picture_Property" />
<asp:BoundField DataField="Property_ID" HeaderText="Property_ID"
InsertVisible="False" ReadOnly="True" SortExpression="Property_ID" />
</Columns>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
</asp:GridView>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<div>
</div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="55555.aspx.cs" Inherits="_55555" %>