Hi,
I guess.This source code should help you.
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:CRMConnectionString %>"
ProviderName="<%$
ConnectionStrings:MSCRM_InterfaceConnectionString1.ProviderName %>"
SelectCommand="SELECT [opportunityid],
[opportunityratingcodename], [owneridname] FROM [FilteredOpportunity] WHERE
([opportunityid] = @opportunityid)" >
<selectparameters>
<asp
arameter
DefaultValue="e36ccb0f-cd44-dc11-8078-0010c6be7e4c"
Name="opportunityid" Type="String" />
<%--Inside the selectParameters you can specify other type of parameter as
well.
if you are getting the current user value from control than specify control
parameter
if you are getting the current user value from querystring than user
querystring parameter--%>
</selectparameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server"
DataSourceID="SqlDataSource1" BackColor="White"
BorderColor="#CCCCCC"
.................
</asp:GridView>
Regards,
Nishant Rana