Click here to Skip to main content
15,903,632 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAdd Multiple Hyperlink control dynamically on button_click event Pin
hemrk13-Aug-08 11:10
hemrk13-Aug-08 11:10 
AnswerRe: Add Multiple Hyperlink control dynamically on button_click event Pin
student_rhr13-Aug-08 16:20
student_rhr13-Aug-08 16:20 
QuestionStart a process on Page_Load but dont wait for it!! Pin
student_rhr13-Aug-08 10:42
student_rhr13-Aug-08 10:42 
AnswerRe: Start a process on Page_Load but dont wait for it!! Pin
Christian Graus13-Aug-08 11:30
protectorChristian Graus13-Aug-08 11:30 
AnswerRe: Start a process on Page_Load but dont wait for it!! Pin
metallica_rock1013-Aug-08 21:22
metallica_rock1013-Aug-08 21:22 
QuestionLoggedInTemplate Pin
Cyberpulse13-Aug-08 9:23
Cyberpulse13-Aug-08 9:23 
AnswerRe: LoggedInTemplate Pin
student_rhr13-Aug-08 16:29
student_rhr13-Aug-08 16:29 
QuestionLDAP unlock account page Pin
markalanknight13-Aug-08 7:14
markalanknight13-Aug-08 7:14 
i am trying to create a asp.net page to unlock accounts in Active Directory.
before I get into passing the account through the UI I am just plugging it directly into the code.
The code below is not unlocking the account. (i have access to AD and locked the account myself, and can see that it is still locked)
I was even trying to see if the display name would come up if attached to a label.text and it wouldnt. what i am i doing wrong?

aspx.vb file
Imports System.DirectoryServices<br />
Imports System.DirectoryServices.ActiveDirectory<br />
<br />
Partial Class testing_Default2<br />
    Inherits System.Web.UI.Page<br />
  <br />
    Public Sub Unlock(ByVal userDn As String)<br />
<br />
        Try<br />
            Dim uEntry As DirectoryEntry = New DirectoryEntry("LDAP://domaincontrolleraddress/CN=Brady Demo,DC=inside,DC=jonesknows,DC=com",  myusername, mypassword)<br />
'domaincontrolleraddress is exactly what it says. myusername and my password are to be replaced<br />
            uEntry.Properties("LockOutTime").Value = 0<br />
            Label1.Text = uEntry.Properties("displayName").Value  <br />
            'unlock account<br />
            uEntry.CommitChanges()<br />
            'may not be needed but adding it anyways<br />
            uEntry.Close()<br />
        Catch E As System.DirectoryServices.DirectoryServicesCOMException<br />
            'Label1.Text = E.Message.ToString()<br />
        End Try<br />
    End Sub<br />
<br />
End Class


aspx file"
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="testing_Default2" %><br />
<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
    <title>Untitled Page</title><br />
</head><br />
<body><br />
    <form id="form1" runat="server"><br />
    <div><br />
        <br /><br />
        &nbsp;<br />
        <asp:Button ID="Button1" runat="server" Text="Button" <br />
            onclientclick="Unlock()" /><br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
        <asp:Label ID="Label1" runat="server" ></asp:Label><br />
    </div><br />
    </form><br />
</body><br />
</html>

QuestionJavascript used in C#.Net Pin
Subin Alex13-Aug-08 4:56
Subin Alex13-Aug-08 4:56 
AnswerRe: Javascript used in C#.Net Pin
eyeseetee13-Aug-08 4:59
eyeseetee13-Aug-08 4:59 
QuestionQuery about Session Management in SQL Server Pin
Rocky#13-Aug-08 4:49
Rocky#13-Aug-08 4:49 
Question3rd Party TreeView that Bind to Object Pin
Muhammad Gouda13-Aug-08 4:33
Muhammad Gouda13-Aug-08 4:33 
AnswerRe: 3rd Party TreeView that Bind to Object Pin
Rocky#13-Aug-08 5:01
Rocky#13-Aug-08 5:01 
Questionhow can i save file as it a duplicate with out using fileupload control Pin
Shaik Haneef13-Aug-08 3:45
Shaik Haneef13-Aug-08 3:45 
AnswerRe: how can i save file as it a duplicate with out using fileupload control Pin
Manas Bhardwaj13-Aug-08 4:11
professionalManas Bhardwaj13-Aug-08 4:11 
Question[Message Deleted] Pin
SAadmin13-Aug-08 3:45
SAadmin13-Aug-08 3:45 
AnswerRe: How to display Username that is logged on to the computer on a web page in vb.net code behind Pin
Manas Bhardwaj13-Aug-08 4:11
professionalManas Bhardwaj13-Aug-08 4:11 
JokeRe: How to display Username that is logged on to the computer on a web page in vb.net code behind [modified] Pin
Manas Bhardwaj13-Aug-08 4:46
professionalManas Bhardwaj13-Aug-08 4:46 
GeneralRe: How to display Username that is logged on to the computer on a web page in vb.net code behind Pin
Christian Graus13-Aug-08 11:31
protectorChristian Graus13-Aug-08 11:31 
GeneralRe: How to display Username that is logged on to the computer on a web page in vb.net code behind Pin
Manas Bhardwaj13-Aug-08 11:35
professionalManas Bhardwaj13-Aug-08 11:35 
AnswerRe: How to display Username that is logged on to the computer on a web page in vb.net code behind Pin
metallica_rock1013-Aug-08 21:24
metallica_rock1013-Aug-08 21:24 
QuestionHow to Adding more rows to grid Pin
Member 465900113-Aug-08 3:31
Member 465900113-Aug-08 3:31 
Questionerror on javascript Pin
UD(IA)13-Aug-08 3:27
UD(IA)13-Aug-08 3:27 
AnswerRe: error on javascript Pin
Christian Graus13-Aug-08 11:33
protectorChristian Graus13-Aug-08 11:33 
GeneralRe: error on javascript Pin
Bassam Saoud13-Aug-08 11:43
Bassam Saoud13-Aug-08 11:43 

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.