Click here to Skip to main content
15,887,989 members
Home / Discussions / C#
   

C#

 
AnswerRe: Date as a Regular Expression Pin
Judah Gabriel Himango23-Apr-06 7:52
sponsorJudah Gabriel Himango23-Apr-06 7:52 
QuestionDate in DataBinding Pin
alee15.10.8823-Apr-06 5:48
alee15.10.8823-Apr-06 5:48 
AnswerRe: Date in DataBinding Pin
Robert Rohde24-Apr-06 1:37
Robert Rohde24-Apr-06 1:37 
GeneralRe: Date in DataBinding Pin
alee15.10.8824-Apr-06 1:51
alee15.10.8824-Apr-06 1:51 
GeneralRe: Date in DataBinding Pin
Robert Rohde24-Apr-06 2:59
Robert Rohde24-Apr-06 2:59 
Questionretreiving both local users and active directory users Pin
e_akhras23-Apr-06 4:56
e_akhras23-Apr-06 4:56 
AnswerRe: retreiving both local users and active directory users Pin
abdallahziad23-Apr-06 6:02
abdallahziad23-Apr-06 6:02 
AnswerRe: retreiving both local users and active directory users Pin
abdallahziad23-Apr-06 6:09
abdallahziad23-Apr-06 6:09 
i think this code will help you ;
but first you should sign on the domain as a administrator
then add the active directory refference to the code below:

////
//
//
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.DirectoryServices;// the active dirctory library

namespace abdallah1
{
///
/// Summary description for WebForm1.
///

public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.ListBox ListBox1;

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
private void retrivedata(string strDoamin)
{
DirectoryEntry obDirEntry = null;
try
{
obDirEntry = new DirectoryEntry("WinNT://" + strDoamin);
DirectoryEntries entries = obDirEntry.Children;
foreach (DirectoryEntry chil in entries )
{
if ( chil.SchemaClassName =="User")// to retrive the user only
{
ListBox1.Items.Add( chil.Name + "//" +chil.SchemaClassName);
}
}

}
catch (Exception ex)
{
Trace.Warn(ex.Message);
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void Button1_Click(object sender, System.EventArgs e)
{


retrivedata ("nwtraders");
Label1.Text="Data retrived sucssfully";

}
}
}
////////
GeneralRe: retreiving both local users and active directory users Pin
e_akhras24-Apr-06 1:07
e_akhras24-Apr-06 1:07 
Questionany info, about rational rose models , kinds , exampels ? Pin
abdallahziad23-Apr-06 3:15
abdallahziad23-Apr-06 3:15 
AnswerRe: any info, about rational rose models , kinds , exampels ? Pin
alexey N23-Apr-06 17:54
alexey N23-Apr-06 17:54 
Generalthx for helping Pin
abdallahziad24-Apr-06 2:03
abdallahziad24-Apr-06 2:03 
QuestionRotate images with links Pin
Amalarajan23-Apr-06 2:49
Amalarajan23-Apr-06 2:49 
AnswerRe: Rotate images with links Pin
e_akhras23-Apr-06 5:17
e_akhras23-Apr-06 5:17 
GeneralRe: Rotate images with links Pin
Amalarajan24-Apr-06 0:18
Amalarajan24-Apr-06 0:18 
AnswerRe: Rotate images with links Pin
sudharsong23-Apr-06 21:33
sudharsong23-Apr-06 21:33 
QuestionSynchronization with C# Pin
Lilla8823-Apr-06 2:37
Lilla8823-Apr-06 2:37 
AnswerRe: Synchronization with C# Pin
Graham Nimbley24-Apr-06 13:39
Graham Nimbley24-Apr-06 13:39 
QuestionGenerate documentation Pin
JensB23-Apr-06 1:40
JensB23-Apr-06 1:40 
AnswerRe: Generate documentation Pin
CWIZO23-Apr-06 2:54
CWIZO23-Apr-06 2:54 
AnswerRe: Generate documentation Pin
Graham Nimbley24-Apr-06 13:43
Graham Nimbley24-Apr-06 13:43 
QuestionGetting error: There is already an open DataReader associated with this Command which must be closed first. Pin
emran83423-Apr-06 0:21
emran83423-Apr-06 0:21 
AnswerRe: Getting error: There is already an open DataReader associated with this Command which must be closed first. Pin
Guffa23-Apr-06 0:56
Guffa23-Apr-06 0:56 
Answerit's a ADO.NET limitation ! Pin
e_akhras23-Apr-06 5:09
e_akhras23-Apr-06 5:09 
AnswerRe: it's a ADO.NET limitation ! Pin
Guffa23-Apr-06 5:38
Guffa23-Apr-06 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.