Author: amao | Posted on: 9/3/2008 3:52:29 AM | Views : 265

 hi all
 
protected void SqlDataSource1_Selecting1(object sender, SqlDataSourceSelectingEventArgs e)
{
// Get a reference to the currently logged on user
MembershipUser currentUser = Membership.GetUser();

// Determine the currently logged on user's UserId value
Guid currentUserId = (Guid)currentUser.ProviderUserKey;

// Assign the currently logged on user's UserId to the @UserId parameter
e.Command.Parameters["@UserId"].Value = currentUserId;

}


protected void Button1_Click(object sender, EventArgs e)
{
string connectionString = @connectionString = @"Data Source=.\SQLEXPRESS;A ...

Go to the complete details ...