dhananjaym: Could you throw some light on how you did it.
Cheers!
Since my issue was within the chatrooms, I wrote a GetUserDiplayName function into the SampleProvider.cs file.
public string GetDisplayName(string username)
{
SqlConnection conn = this.CreateConnection();
String tusername = "User:" + username;
SqlCommand cmd = new SqlCommand("SELECT DisplayName from CuteChat4_User WHERE UserID=@Username", conn);
SqlParameter paraUsername = cmd.Parameters.Add("@Username", SqlDbType.NVarChar);
paraUsername.Value = tusername;
try
{
conn.Open();
string tmp = (String)cmd.ExecuteScalar();
if (tmp.Length < 5) //in case they've never set a display name, but let "admin" in
{
return username;
}
if (tmp.ToLower() != username.ToLower())
{
return tmp;
}
else
{
return username;
}
}
catch
{
return username;
}
finally
{
conn.Close();
}
}