It contains lots on Business Intelligence scenarios and solutions along with real problems regarding Microsoft Excel, SQL Server Reporting Services, SQL Server Integration & Analysis Services and various databases and also may contain other popular posts.
How to pass logged in user name as SqlParameter in ASP.NET
In the scenario i have a gridview, which should contain the data based on current logged in user. The main challenge, i was facing how to pass current login user name to the Sqlparameter. After a little research i got a wonderful solution which is worked - Step 1- Defined select parameter in "<asp:SqlDataSource" as
Step 2- In page load write the below code -
This work perfect for me, Please provide your comment if you got something better.