I had used the SqlDataSource to retrieve data from database to gridview.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HRMS_DBConnectionString1 %>"
DeleteCommand="DELETE FROM [tblEmployeeDetail] WHERE [EmpId] = @EmpId" InsertCommand="INSERT INTO [tblEmployeeDetail] ([EmpId], [Name], [UserName], [Password], [Gender], [Age], [Address], [IdentityCardNo], [Race], [Position], [Section], [Department], [JoinDate], [ResignDate], [HodId], [Email]) VALUES (@EmpId, @Name, @UserName, @Password, @Gender, @Age, @Address, @IdentityCardNo, @Race, @Position, @Section, @Department, @JoinDate, @ResignDate, @HodId, @Email)"
ProviderName="<%$ ConnectionStrings:HRMS_DBConnectionString1.ProviderName %>"
SelectCommand="SELECT [EmpId], [Name], [UserName], [Password], [Gender], [Age], [Address], [IdentityCardNo], [Race], [Position], [Section], [Department], [JoinDate], [ResignDate], [HodId], [Email] FROM [tblEmployeeDetail] WHERE ([Name] IS NULL)"
For security purpose is there any ways so I can hide this coding. It obviously showing the table name and its entities all. I wish to use this function as its easier to manage data in gridview with direct auto edit and delete function but at sametime the presentation layer suppose not reveal the database content in coding. Is there anyway?