I have a property in my page2.aspx.cs page
public int? Id
{
get
{
if (ViewState[Page1.Id] != null)
return Convert.ToInt32(ViewState[Page1.Id]);
else return null;
}
set
{
ViewState[Id] = value;
}
}
and I am using asp: data sourse:
<asp:SqlDataSource ID="SqlDataSourceGridView" runat="server"
ProviderName="System.Data.SqlClient"
SelectCommand="SELECT [Name],[Address] FROM [Table_Emp] where Id = need to pass property value >"
OnSelecting="SqlDataSourceGridView_Selecting">
</asp:SqlDataSource>
I want to pass Id in my where condition. how is it possible.
Please some one help me.