|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by sonashish in MS SharePoint
Hello
I have created an aspx page in which I am getching oracle database in a aspgrid view object. Then I put this page under a subfolder of sharepoit layouts folder. I am able to run this page without any problem. Now I want to give sharepoint flavor to this aspx page.
Let me know how can I do this?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
|
<%@ Page Language="C#" CodeFile="GridviewwithFiltering.cs" Inherits="GridviewwithFiltering" AutoEventWireup="true" EnableSessionState="False"%>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="wssap" Namespace="Microsoft.SharePoint.ApplicationPages" Assembly="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<!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 profile="http://gmpg.org/xfn/11">
<link rel="stylesheet" type="text/css" href="gridview.css" media="all" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<h3>Res </h3>
<asp:Label ID="litlist" visible=false runat="server"></asp:Label>
<div class="GridviewDiv">
<table style="width: 540px" border="0" cellpadding="0" cellspacing="1" class="GridviewTable">
<tr >
<td style="width: 240px;" >
CUST No
<asp:Label runat="server" ID="lblError" />
</td>
<td style="width: 100px;">
ACCT Code
</td>
<td style="width: 100px;">
Year
</td>
<td style="width: 100px;">
Month
</td>
</tr>
<tr >
<td style="width: 240px;">
</td>
<td style="width: 100px;">
</td>
<td style="width: 100px;">
<asp:DropDownList ID="ddlYear" DataSourceID="dsPopulateYear" AutoPostBack="true"
DataValueField="Year" runat="server" Width="85px" Font-Size="11px" AppendDataBoundItems="true">
<asp:ListItem Text="All" Value="%"></asp:ListItem>
</asp:DropDownList>
</td>
<td style="width: 100px;">
<asp:DropDownList ID="ddlMonth" DataSourceID="dsPopulateMonth" AutoPostBack="true"
DataValueField="Month" runat="server" Width="85px" Font-Size="11px" AppendDataBoundItems="true">
<asp:ListItem Text="All" Value="%"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="4">
<asp:GridView ID="Gridview1" runat="server" AutoGenerateColumns="False" AllowPaging="True"
AllowSorting="true" DataSourceID="dsGridview" Width="540px" PageSize="10" PagerSettings-Mode=NumericFirstLast CssClass="Gridview">
<Columns>
<asp:BoundField DataField="CUST_NO" HeaderText="Sort" SortExpression="CUST_NO"
ItemStyle-Width="240px" />
<asp:BoundField DataField="ACCT_code" HeaderText="Sort" SortExpression="ACCT_code"
ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center"/>
<asp:BoundField DataField="Year" HeaderText="Sort" SortExpression="Year"
ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="Month" HeaderText="Sort" SortExpression="Month"
ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center"/>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</div>
<asp:SqlDataSource ID="dsGridview" runat="server" ConnectionString="<%$ ConnectionStrings:MySqleConnectionString %>"
ProviderName="<%$ ConnectionStrings:MySqleConnectionString.ProviderName %>"
SelectCommand="SELECT CUST_no,ACCT_code,year, month FROM trans_view where length(year)>0 and length(month)>0 "
FilterExpression="Convert(Year, 'System.String') like '{0}%' and Convert(Month, 'System.String') like '{1}%'">
<FilterParameters>
<asp:ControlParameter Name="Year" ControlID="ddlYear" PropertyName="SelectedValue" />
<asp:ControlParameter Name="Month" ControlID="ddlMonth" PropertyName="SelectedValue" />
</FilterParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsPopulateYear" runat="server" ConnectionString="<%$ ConnectionStrings:MySqleConnectionString %>"
ProviderName="<%$ ConnectionStrings:MySqleConnectionString.ProviderName %>"
SelectCommand="SELECT DISTINCT Year from trans_view where length(year)>0 order by year">
</asp:SqlDataSource>
<asp:SqlDataSource ID="dsPopulateMonth" runat="server" ConnectionString="<%$ ConnectionStrings:MySqleConnectionString %>"
ProviderName="<%$ ConnectionStrings:MySqleConnectionString.ProviderName %>"
SelectCommand="SELECT DISTINCT Month FROM trans_view where length(month)>0 order by month">
</asp:SqlDataSource>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625