Advertisement

03.13.2008 at 01:14PM PDT, ID: 23239989
[x]
Attachment Details

separate a string

Asked by gladstonesheeba in Microsoft Visual C#.Net, C# Programming Language

Tags: microsoft, visual studio.net, 2008, C#.net

hi,
   i Have a application that has a windows authentication. before the user login to the home page, they need to provide the username and password in the window popup. in my page load event iam retreving the username
system.security.principal.iprincipal user;
user=system.web.httpcontext.current.user;
string username;
username=user.identity.name;

when i debug the application the name showing is like domain\\username. that's fine but i want to send only the username  as a parameter to a class called authenticate() where it will connect to the database and check the roles and groups. i want to know how to separate the donain and the username in two different strings and pass just the username as a parameter to the class.

For example

corp\\glad

i want to send the username "glad" to the authenticate class. how to do this. please guide me in this.Start Free Trial
[+][-]03.13.2008 at 01:17PM PDT, ID: 21120404

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 01:22PM PDT, ID: 21120452

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 01:23PM PDT, ID: 21120462

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 01:30PM PDT, ID: 21120540

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.13.2008 at 01:32PM PDT, ID: 21120549

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, C# Programming Language
Tags: microsoft, visual studio.net, 2008, C#.net
Sign Up Now!
Solution Provided By: ZachSmith
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628