Showing posts with label netasp. Show all posts
Showing posts with label netasp. Show all posts

Saturday, March 24, 2012

newbie: webpart & Untitled

OS: XP pro
IDE VS 2005 .NET
ASP.NET 2.0

I've created a very simple asp.net page that contains only 1 WebPartZone. In
this WebPartZone have I placed a Calendar control (webpart)...

The top of this calendar have the text "Untitled"...

my PROBLEM is that I don't want the text "Untitled" to be displayed, but I'm
not sure how to remove it... Isn't there a setting for this on the webpart
(calendar)?..

Please help me with this!

Best Regards!

JeffJeff

Just Add the Title property to the asp:Calendar Control manually in XHTML

<asp:Calendar ID="Calendar1" runat="server" BackColor="White"
BorderColor="#999999"

CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
Font-Size="8pt"

ForeColor="Black" Height="53px" Width="1px" Title=" "
Notice that Title = "space" not empty

SA

"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:eTkWZaFdGHA.3388@.TK2MSFTNGP05.phx.gbl...
> OS: XP pro
> IDE VS 2005 .NET
> ASP.NET 2.0
> I've created a very simple asp.net page that contains only 1 WebPartZone.
> In this WebPartZone have I placed a Calendar control (webpart)...
> The top of this calendar have the text "Untitled"...
> my PROBLEM is that I don't want the text "Untitled" to be displayed, but
> I'm not sure how to remove it... Isn't there a setting for this on the
> webpart (calendar)?..
> Please help me with this!
> Best Regards!
> Jeff
Jeff,

You are in luck if the asp:Calendar Control is the second item in the
WebPartZone.
However the First control will still have the same problem
You might have to create your own derived control and implement some
Interface like Implement IWebPart ?

example: that works
<web part zone >
<textbox...> ... Does not work
<calendar... Title=" " >... Works
</web part zone
example: that works only for TextBox
<web part zone >
<calendar... Title=" " >... Works
<textbox...Title=" " > ... Does not work
</web part zone
??

SA

"MSDN" <sql_agentman@.hotmail.com> wrote in message
news:%23pqir6FdGHA.3712@.TK2MSFTNGP03.phx.gbl...
> Jeff
> Just Add the Title property to the asp:Calendar Control manually in XHTML
> <asp:Calendar ID="Calendar1" runat="server" BackColor="White"
> BorderColor="#999999"
> CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
> Font-Size="8pt"
> ForeColor="Black" Height="53px" Width="1px" Title=" ">
> Notice that Title = "space" not empty
> SA
> "Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
> news:eTkWZaFdGHA.3388@.TK2MSFTNGP05.phx.gbl...
>> OS: XP pro
>> IDE VS 2005 .NET
>> ASP.NET 2.0
>>
>> I've created a very simple asp.net page that contains only 1 WebPartZone.
>> In this WebPartZone have I placed a Calendar control (webpart)...
>>
>> The top of this calendar have the text "Untitled"...
>>
>> my PROBLEM is that I don't want the text "Untitled" to be displayed, but
>> I'm not sure how to remove it... Isn't there a setting for this on the
>> webpart (calendar)?..
>>
>> Please help me with this!
>>
>> Best Regards!
>>
>> Jeff
>>
Sorry,

example: that works only for TextBox
<web part zone >
<calendar... Title=" " >... Does not work
<textbox...Title=" " > ... Works
</web part zone
SA

"MSDN" <sql_agentman@.hotmail.com> wrote in message
news:ONYbyFGdGHA.4148@.TK2MSFTNGP05.phx.gbl...
> Jeff,
> You are in luck if the asp:Calendar Control is the second item in the
> WebPartZone.
> However the First control will still have the same problem
> You might have to create your own derived control and implement some
> Interface like Implement IWebPart ?
> example: that works
> <web part zone >
> <textbox...> ... Does not work
> <calendar... Title=" " >... Works
> </web part zone>
> example: that works only for TextBox
> <web part zone >
> <calendar... Title=" " >... Works
> <textbox...Title=" " > ... Does not work
> </web part zone>
> ??
> SA
>
> "MSDN" <sql_agentman@.hotmail.com> wrote in message
> news:%23pqir6FdGHA.3712@.TK2MSFTNGP03.phx.gbl...
>> Jeff
>>
>> Just Add the Title property to the asp:Calendar Control manually in XHTML
>>
>> <asp:Calendar ID="Calendar1" runat="server" BackColor="White"
>> BorderColor="#999999"
>>
>> CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
>> Font-Size="8pt"
>>
>> ForeColor="Black" Height="53px" Width="1px" Title=" ">
>>
>> Notice that Title = "space" not empty
>>
>> SA
>>
>> "Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
>> news:eTkWZaFdGHA.3388@.TK2MSFTNGP05.phx.gbl...
>>> OS: XP pro
>>> IDE VS 2005 .NET
>>> ASP.NET 2.0
>>>
>>> I've created a very simple asp.net page that contains only 1
>>> WebPartZone. In this WebPartZone have I placed a Calendar control
>>> (webpart)...
>>>
>>> The top of this calendar have the text "Untitled"...
>>>
>>> my PROBLEM is that I don't want the text "Untitled" to be displayed, but
>>> I'm not sure how to remove it... Isn't there a setting for this on the
>>> webpart (calendar)?..
>>>
>>> Please help me with this!
>>>
>>> Best Regards!
>>>
>>> Jeff
>>>
>>
>>
Yeah, <calendar... Title=" " >... Does not work... when I in Visual Studio
2005 start typing Title the typeahead doesn't show the property Title, it
shows many other properties about Title (like TitleFormat etc, but no
Title)... And the Title property I set in by myself gets a green line under
itself... This tell me that this isn't the correct way to do this.. OR it is
but I don't see it yet... I'm a newbie

But the way I've seen the multimedia presentation about creating Web Parts
at
http://msdn.microsoft.com/asp.net/l...aspx#Multimedia
and in that presentation they don't add the Title property... still they
get no "Untitled" in the header of the calendar...

The header in my calendar contains the word "Untitled" and a sign I can
click on and open the web part menu (Minimize, Close)

Is the Title property the only solution here or are there some other
solutions also?

Jeff

"MSDN" <sql_agentman@.hotmail.com> wrote in message
news:%23n0xxHGdGHA.4108@.TK2MSFTNGP03.phx.gbl...
> Sorry,
> example: that works only for TextBox
> <web part zone >
> <calendar... Title=" " >... Does not work
> <textbox...Title=" " > ... Works
> </web part zone>
> SA
> "MSDN" <sql_agentman@.hotmail.com> wrote in message
> news:ONYbyFGdGHA.4148@.TK2MSFTNGP05.phx.gbl...
>> Jeff,
>>
>> You are in luck if the asp:Calendar Control is the second item in the
>> WebPartZone.
>> However the First control will still have the same problem
>> You might have to create your own derived control and implement some
>> Interface like Implement IWebPart ?
>>
>> example: that works
>> <web part zone >
>> <textbox...> ... Does not work
>> <calendar... Title=" " >... Works
>> </web part zone>
>>
>> example: that works only for TextBox
>> <web part zone >
>> <calendar... Title=" " >... Works
>> <textbox...Title=" " > ... Does not work
>> </web part zone>
>>
>> ??
>>
>> SA
>>
>>
>> "MSDN" <sql_agentman@.hotmail.com> wrote in message
>> news:%23pqir6FdGHA.3712@.TK2MSFTNGP03.phx.gbl...
>>> Jeff
>>>
>>> Just Add the Title property to the asp:Calendar Control manually in
>>> XHTML
>>>
>>> <asp:Calendar ID="Calendar1" runat="server" BackColor="White"
>>> BorderColor="#999999"
>>>
>>> CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
>>> Font-Size="8pt"
>>>
>>> ForeColor="Black" Height="53px" Width="1px" Title=" ">
>>>
>>> Notice that Title = "space" not empty
>>>
>>> SA
>>>
>>> "Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
>>> news:eTkWZaFdGHA.3388@.TK2MSFTNGP05.phx.gbl...
>>>> OS: XP pro
>>>> IDE VS 2005 .NET
>>>> ASP.NET 2.0
>>>>
>>>> I've created a very simple asp.net page that contains only 1
>>>> WebPartZone. In this WebPartZone have I placed a Calendar control
>>>> (webpart)...
>>>>
>>>> The top of this calendar have the text "Untitled"...
>>>>
>>>> my PROBLEM is that I don't want the text "Untitled" to be displayed,
>>>> but I'm not sure how to remove it... Isn't there a setting for this on
>>>> the webpart (calendar)?..
>>>>
>>>> Please help me with this!
>>>>
>>>> Best Regards!
>>>>
>>>> Jeff
>>>>
>>>
>>>
>>
>>
I was able to get rid of the Title "Untitled" when I added a TextBox before
the Calendar Control and Added the Title= " "
Even though the typeahead complained about it.

So it is a very strange behavior that it works if it is the second control
in the list.

I know this is not the right way.

SA

"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:uk9Ep3GdGHA.1208@.TK2MSFTNGP04.phx.gbl...
> Yeah, <calendar... Title=" " >... Does not work... when I in Visual
> Studio 2005 start typing Title the typeahead doesn't show the property
> Title, it shows many other properties about Title (like TitleFormat etc,
> but no Title)... And the Title property I set in by myself gets a green
> line under itself... This tell me that this isn't the correct way to do
> this.. OR it is but I don't see it yet... I'm a newbie
> But the way I've seen the multimedia presentation about creating Web Parts
> at
> http://msdn.microsoft.com/asp.net/l...aspx#Multimedia
> and in that presentation they don't add the Title property... still they
> get no "Untitled" in the header of the calendar...
> The header in my calendar contains the word "Untitled" and a sign I can
> click on and open the web part menu (Minimize, Close)
> Is the Title property the only solution here or are there some other
> solutions also?
> Jeff
>
>
> "MSDN" <sql_agentman@.hotmail.com> wrote in message
> news:%23n0xxHGdGHA.4108@.TK2MSFTNGP03.phx.gbl...
>> Sorry,
>>
>> example: that works only for TextBox
>> <web part zone >
>> <calendar... Title=" " >... Does not work
>> <textbox...Title=" " > ... Works
>> </web part zone>
>>
>> SA
>>
>> "MSDN" <sql_agentman@.hotmail.com> wrote in message
>> news:ONYbyFGdGHA.4148@.TK2MSFTNGP05.phx.gbl...
>>> Jeff,
>>>
>>> You are in luck if the asp:Calendar Control is the second item in the
>>> WebPartZone.
>>> However the First control will still have the same problem
>>> You might have to create your own derived control and implement some
>>> Interface like Implement IWebPart ?
>>>
>>> example: that works
>>> <web part zone >
>>> <textbox...> ... Does not work
>>> <calendar... Title=" " >... Works
>>> </web part zone>
>>>
>>> example: that works only for TextBox
>>> <web part zone >
>>> <calendar... Title=" " >... Works
>>> <textbox...Title=" " > ... Does not work
>>> </web part zone>
>>>
>>> ??
>>>
>>> SA
>>>
>>>
>>> "MSDN" <sql_agentman@.hotmail.com> wrote in message
>>> news:%23pqir6FdGHA.3712@.TK2MSFTNGP03.phx.gbl...
>>>> Jeff
>>>>
>>>> Just Add the Title property to the asp:Calendar Control manually in
>>>> XHTML
>>>>
>>>> <asp:Calendar ID="Calendar1" runat="server" BackColor="White"
>>>> BorderColor="#999999"
>>>>
>>>> CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
>>>> Font-Size="8pt"
>>>>
>>>> ForeColor="Black" Height="53px" Width="1px" Title=" ">
>>>>
>>>> Notice that Title = "space" not empty
>>>>
>>>> SA
>>>>
>>>> "Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
>>>> news:eTkWZaFdGHA.3388@.TK2MSFTNGP05.phx.gbl...
>>>>> OS: XP pro
>>>>> IDE VS 2005 .NET
>>>>> ASP.NET 2.0
>>>>>
>>>>> I've created a very simple asp.net page that contains only 1
>>>>> WebPartZone. In this WebPartZone have I placed a Calendar control
>>>>> (webpart)...
>>>>>
>>>>> The top of this calendar have the text "Untitled"...
>>>>>
>>>>> my PROBLEM is that I don't want the text "Untitled" to be displayed,
>>>>> but I'm not sure how to remove it... Isn't there a setting for this on
>>>>> the webpart (calendar)?..
>>>>>
>>>>> Please help me with this!
>>>>>
>>>>> Best Regards!
>>>>>
>>>>> Jeff
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>

newbie: webpart & Untitled

OS: XP pro
IDE VS 2005 .NET
ASP.NET 2.0
I've created a very simple asp.net page that contains only 1 WebPartZone. In
this WebPartZone have I placed a Calendar control (webpart)...
The top of this calendar have the text "Untitled"...
my PROBLEM is that I don't want the text "Untitled" to be displayed, but I'm
not sure how to remove it... Isn't there a setting for this on the webpart
(calendar)?..
Please help me with this!
Best Regards!
JeffJeff
Just Add the Title property to the asp:Calendar Control manually in XHTML
<asp:Calendar ID="Calendar1" runat="server" BackColor="White"
BorderColor="#999999"
CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
Font-Size="8pt"
ForeColor="Black" Height="53px" Width="1px" Title=" ">
Notice that Title = "space" not empty
SA
"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:eTkWZaFdGHA.3388@.TK2MSFTNGP05.phx.gbl...
> OS: XP pro
> IDE VS 2005 .NET
> ASP.NET 2.0
> I've created a very simple asp.net page that contains only 1 WebPartZone.
> In this WebPartZone have I placed a Calendar control (webpart)...
> The top of this calendar have the text "Untitled"...
> my PROBLEM is that I don't want the text "Untitled" to be displayed, but
> I'm not sure how to remove it... Isn't there a setting for this on the
> webpart (calendar)?..
> Please help me with this!
> Best Regards!
> Jeff
>
Jeff,
You are in luck if the asp:Calendar Control is the second item in the
WebPartZone.
However the First control will still have the same problem
You might have to create your own derived control and implement some
Interface like Implement IWebPart ?
example: that works
<web part zone >
<textbox...> ... Does not work
<calendar... Title=" " >... Works
</web part zone>
example: that works only for TextBox
<web part zone >
<calendar... Title=" " >... Works
<textbox...Title=" " > ... Does not work
</web part zone>
'
SA
"MSDN" <sql_agentman@.hotmail.com> wrote in message
news:%23pqir6FdGHA.3712@.TK2MSFTNGP03.phx.gbl...
> Jeff
> Just Add the Title property to the asp:Calendar Control manually in XHTML
> <asp:Calendar ID="Calendar1" runat="server" BackColor="White"
> BorderColor="#999999"
> CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
> Font-Size="8pt"
> ForeColor="Black" Height="53px" Width="1px" Title=" ">
> Notice that Title = "space" not empty
> SA
> "Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
> news:eTkWZaFdGHA.3388@.TK2MSFTNGP05.phx.gbl...
>
Sorry,
example: that works only for TextBox
<web part zone >
<calendar... Title=" " >... Does not work
<textbox...Title=" " > ... Works
</web part zone>
SA
"MSDN" <sql_agentman@.hotmail.com> wrote in message
news:ONYbyFGdGHA.4148@.TK2MSFTNGP05.phx.gbl...
> Jeff,
> You are in luck if the asp:Calendar Control is the second item in the
> WebPartZone.
> However the First control will still have the same problem
> You might have to create your own derived control and implement some
> Interface like Implement IWebPart ?
> example: that works
> <web part zone >
> <textbox...> ... Does not work
> <calendar... Title=" " >... Works
> </web part zone>
> example: that works only for TextBox
> <web part zone >
> <calendar... Title=" " >... Works
> <textbox...Title=" " > ... Does not work
> </web part zone>
> '
> SA
>
> "MSDN" <sql_agentman@.hotmail.com> wrote in message
> news:%23pqir6FdGHA.3712@.TK2MSFTNGP03.phx.gbl...
>
Yeah, <calendar... Title=" " >... Does not work... when I in Visual Studio
2005 start typing Title the typeahead doesn't show the property Title, it
shows many other properties about Title (like TitleFormat etc, but no
Title)... And the Title property I set in by myself gets a green line under
itself... This tell me that this isn't the correct way to do this.. OR it is
but I don't see it yet... I'm a newbie
But the way I've seen the multimedia presentation about creating Web Parts
at
timedia" target="_blank">http://msdn.microsoft.com/asp.net/l...
timedia
and in that presentation they don't add the Title property... still they
get no "Untitled" in the header of the calendar...
The header in my calendar contains the word "Untitled" and a sign I can
click on and open the web part menu (Minimize, Close)
Is the Title property the only solution here or are there some other
solutions also?
Jeff
"MSDN" <sql_agentman@.hotmail.com> wrote in message
news:%23n0xxHGdGHA.4108@.TK2MSFTNGP03.phx.gbl...
> Sorry,
> example: that works only for TextBox
> <web part zone >
> <calendar... Title=" " >... Does not work
> <textbox...Title=" " > ... Works
> </web part zone>
> SA
> "MSDN" <sql_agentman@.hotmail.com> wrote in message
> news:ONYbyFGdGHA.4148@.TK2MSFTNGP05.phx.gbl...
>
I was able to get rid of the Title "Untitled" when I added a TextBox before
the Calendar Control and Added the Title= " "
Even though the typeahead complained about it.
So it is a very strange behavior that it works if it is the second control
in the list.
I know this is not the right way.
SA
"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:uk9Ep3GdGHA.1208@.TK2MSFTNGP04.phx.gbl...
> Yeah, <calendar... Title=" " >... Does not work... when I in Visual
> Studio 2005 start typing Title the typeahead doesn't show the property
> Title, it shows many other properties about Title (like TitleFormat etc,
> but no Title)... And the Title property I set in by myself gets a green
> line under itself... This tell me that this isn't the correct way to do
> this.. OR it is but I don't see it yet... I'm a newbie
> But the way I've seen the multimedia presentation about creating Web Parts
> at
> ultimedia" target="_blank">http://msdn.microsoft.com/asp.net/l...r />
ultimedia
> and in that presentation they don't add the Title property... still they
> get no "Untitled" in the header of the calendar...
> The header in my calendar contains the word "Untitled" and a sign I can
> click on and open the web part menu (Minimize, Close)
> Is the Title property the only solution here or are there some other
> solutions also?
> Jeff
>
>
> "MSDN" <sql_agentman@.hotmail.com> wrote in message
> news:%23n0xxHGdGHA.4108@.TK2MSFTNGP03.phx.gbl...
>

Thursday, March 22, 2012

newboe: how to get the user name?

OS: XP pro
IDE VS 2005 .NET
ASP.NET 2.0
System.Security.AccessControl.SecurityInfos.Owner.ToString() returns
domain\username...if the domain is named "TEST" and username is "per" then
this statement returns TEST\per...
But what code must I do if I went to the fullname of the user?
JeffAsk the user to put it into a form. ;-)
Seriously, though, if the user is logged in to Active Directory, you should
be able to use the System.DirectoryServices namespace and classes to query
the Active Directory for this information.
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:un2nKgZeGHA.564@.TK2MSFTNGP02.phx.gbl...
> OS: XP pro
> IDE VS 2005 .NET
> ASP.NET 2.0
> System.Security.AccessControl.SecurityInfos.Owner.ToString() returns
> domain\username...if the domain is named "TEST" and username is "per" then
> this statement returns TEST\per...
> But what code must I do if I went to the fullname of the user?
> Jeff
>
Thanks, I'm looking into it now:
System.DirectoryServices.DirectoryEntry de = new
System.DirectoryServices.DirectoryEntry();
string fullname = de.Properties["displayName"].Value.ToString();
This code isn't working because I need to set the de.Path property before
executing the last line.. I'm not sure how to get the domain name the user
is logged into...Any tips would be great...
I've tryed, with out luck using this statment:
string domain = de.Properties["defaultNamingContext"][0];
This statement gives me an error message saying "This domain do not exist"
(or something like that, the error message I get on my computer is in
Norwegian and I translated it into English... I'm a native Norwegian)
What am I doing wrong here?
Any tips would be received with great appreciation!
Jeff
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
news:uKn1CxZeGHA.5012@.TK2MSFTNGP05.phx.gbl...
> Ask the user to put it into a form. ;-)
> Seriously, though, if the user is logged in to Active Directory, you
> should be able to use the System.DirectoryServices namespace and classes
> to query the Active Directory for this information.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> Professional Numbskull
> Hard work is a medication for which
> there is no placebo.
> "Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
> news:un2nKgZeGHA.564@.TK2MSFTNGP02.phx.gbl...
>
Your app will only be able to get AD information about the domain it belongs
to.
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Hard work is a medication for which
there is no placebo.
"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:%23hChlzaeGHA.3888@.TK2MSFTNGP02.phx.gbl...
> Thanks, I'm looking into it now:
> System.DirectoryServices.DirectoryEntry de = new
> System.DirectoryServices.DirectoryEntry();
> string fullname = de.Properties["displayName"].Value.ToString();
> This code isn't working because I need to set the de.Path property before
> executing the last line.. I'm not sure how to get the domain name the user
> is logged into...Any tips would be great...
> I've tryed, with out luck using this statment:
> string domain = de.Properties["defaultNamingContext"][0];
> This statement gives me an error message saying "This domain do not exist"
> (or something like that, the error message I get on my computer is in
> Norwegian and I translated it into English... I'm a native Norwegian)
> What am I doing wrong here?
> Any tips would be received with great appreciation!
> Jeff
>
> "Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
> news:uKn1CxZeGHA.5012@.TK2MSFTNGP05.phx.gbl...
>

newboe: how to get the user name?

OS: XP pro
IDE VS 2005 .NET
ASP.NET 2.0

System.Security.AccessControl.SecurityInfos.Owner. ToString() returns
domain\username...if the domain is named "TEST" and username is "per" then
this statement returns TEST\per...

But what code must I do if I went to the fullname of the user?

JeffAsk the user to put it into a form. ;-)

Seriously, though, if the user is logged in to Active Directory, you should
be able to use the System.DirectoryServices namespace and classes to query
the Active Directory for this information.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:un2nKgZeGHA.564@.TK2MSFTNGP02.phx.gbl...
> OS: XP pro
> IDE VS 2005 .NET
> ASP.NET 2.0
> System.Security.AccessControl.SecurityInfos.Owner. ToString() returns
> domain\username...if the domain is named "TEST" and username is "per" then
> this statement returns TEST\per...
> But what code must I do if I went to the fullname of the user?
> Jeff
Thanks, I'm looking into it now:

System.DirectoryServices.DirectoryEntry de = new
System.DirectoryServices.DirectoryEntry();
string fullname = de.Properties["displayName"].Value.ToString();

This code isn't working because I need to set the de.Path property before
executing the last line.. I'm not sure how to get the domain name the user
is logged into...Any tips would be great...

I've tryed, with out luck using this statment:
string domain = de.Properties["defaultNamingContext"][0];
This statement gives me an error message saying "This domain do not exist"
(or something like that, the error message I get on my computer is in
Norwegian and I translated it into English... I'm a native Norwegian)

What am I doing wrong here?

Any tips would be received with great appreciation!

Jeff

"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
news:uKn1CxZeGHA.5012@.TK2MSFTNGP05.phx.gbl...
> Ask the user to put it into a form. ;-)
> Seriously, though, if the user is logged in to Active Directory, you
> should be able to use the System.DirectoryServices namespace and classes
> to query the Active Directory for this information.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> Professional Numbskull
> Hard work is a medication for which
> there is no placebo.
> "Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
> news:un2nKgZeGHA.564@.TK2MSFTNGP02.phx.gbl...
>> OS: XP pro
>> IDE VS 2005 .NET
>> ASP.NET 2.0
>>
>> System.Security.AccessControl.SecurityInfos.Owner. ToString() returns
>> domain\username...if the domain is named "TEST" and username is "per"
>> then this statement returns TEST\per...
>>
>> But what code must I do if I went to the fullname of the user?
>>
>> Jeff
>>
Your app will only be able to get AD information about the domain it belongs
to.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
news:%23hChlzaeGHA.3888@.TK2MSFTNGP02.phx.gbl...
> Thanks, I'm looking into it now:
> System.DirectoryServices.DirectoryEntry de = new
> System.DirectoryServices.DirectoryEntry();
> string fullname = de.Properties["displayName"].Value.ToString();
> This code isn't working because I need to set the de.Path property before
> executing the last line.. I'm not sure how to get the domain name the user
> is logged into...Any tips would be great...
> I've tryed, with out luck using this statment:
> string domain = de.Properties["defaultNamingContext"][0];
> This statement gives me an error message saying "This domain do not exist"
> (or something like that, the error message I get on my computer is in
> Norwegian and I translated it into English... I'm a native Norwegian)
> What am I doing wrong here?
> Any tips would be received with great appreciation!
> Jeff
>
> "Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
> news:uKn1CxZeGHA.5012@.TK2MSFTNGP05.phx.gbl...
>> Ask the user to put it into a form. ;-)
>>
>> Seriously, though, if the user is logged in to Active Directory, you
>> should be able to use the System.DirectoryServices namespace and classes
>> to query the Active Directory for this information.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> Professional Numbskull
>>
>> Hard work is a medication for which
>> there is no placebo.
>>
>> "Jeff" <it_consultant1@.hotmail.com.NOSPAM> wrote in message
>> news:un2nKgZeGHA.564@.TK2MSFTNGP02.phx.gbl...
>>> OS: XP pro
>>> IDE VS 2005 .NET
>>> ASP.NET 2.0
>>>
>>> System.Security.AccessControl.SecurityInfos.Owner. ToString() returns
>>> domain\username...if the domain is named "TEST" and username is "per"
>>> then this statement returns TEST\per...
>>>
>>> But what code must I do if I went to the fullname of the user?
>>>
>>> Jeff
>>>
>>
>>