Ok..
Here is a change up.. not question.. just a example to distinguish viewing person vs profile owner..
using
System;
using
System.Data;
using
System.Configuration;
using
System.Collections;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Web.UI.HtmlControls;
using
MonoSoftware.MonoX;
using
MonoSoftware.MonoX.Utilities;
namespace
TheScene.Web.TheScene.TestControl
{
public
partial
class
TestControl : MonoSoftware.MonoX.BaseAutoRegisterPart
{
public
string
PushEnter =
"\r\n"
;
protected
void
Page_Load(
object
sender, EventArgs e)
{
}
protected
void
CmdGO_Click(
object
sender, EventArgs e)
{
//GET MY USER ID
Guid MyGuid = SecurityUtility.GetUserId();
string
strMyGuid = ((Guid)MyGuid).ToString();
//GET CURRENT VIEWED PROFILE USER ID
Guid ProfileGuid = Guid.Empty;
string
strProfileGuid =
string
.Empty;
string
strProfileuserName =
string
.Empty;
if
(UrlParams.UserProfile.UserName.HasValue)
{
strProfileuserName = UrlParams.UserProfile.UserName.Value;
ProfileGuid = SecurityUtility.GetUserId(strProfileuserName);
strProfileGuid = ((Guid)ProfileGuid).ToString();
}
else
{
strProfileGuid =
"Unknown"
;
}
TextBox1.Text =
""
;
TextBox1.Text = TextBox1.Text +
"YOUR UserID:"
+ strMyGuid +
" "
+ PushEnter;
TextBox1.Text = TextBox1.Text +
"Profile UserName:"
+ strProfileuserName +
" "
+ PushEnter;
TextBox1.Text = TextBox1.Text +
"Profile UserID:"
+ strProfileGuid +
" "
+ PushEnter;
if
(MyGuid == ProfileGuid)
{
TextBox1.Text = TextBox1.Text +
"YOUR PROFILE"
+ PushEnter;
}
else
{
TextBox1.Text = TextBox1.Text +
"NOT YOUR PROFILE"
+ PushEnter;
}
}
}
}