.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

How to retrieve user details without modifying the userIsOnline

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :ASP.Net
 
Hi,I have written an application that user the MemberShip provide.i have a page that needs to retrieve user information, such last activity, isOnlineStatus, CreateDate etc.when i use the following code the status of the user changes. Guid userKey = new Guid(userId); MembershipUser un = Membership.GetUser(userKey); ProfileCommon p = Profile.GetProfile(un.UserName); i can retrieve all the required information for the user whose GUID i provide in Line1, however irrespective of if the user is online or not the status changes to Online.please advise, i need to get the user details without updating the userIsOnline and the lastActivity stamps.


View Complete Post


More Related Resource Links

Linq - add data to database then email user the details

  

Hi all

I'm not sure how to structure the code for this but what I want to do is be able to add data to a database, and once this has completed successfully, then email the user to say the details have been added successfully to the database.

I need to:

1. Check that the relevant data has been added into the database then

2. Email the details of the relevant data when completed. 

 

Thanks in advance for your help,

Laura

 

 


How to retrieve a user profile for any site member

  

Hi, 

I am new to asp.net's membership controls. I am trying to figure out how to make a public profile page that will display information about a site member to other users. I thought I would be able to use the profile class and just pass in a parameter such as user name. But I tried:

 

Profile.GetProfile("username") 'Where username = name of profile I want to retrieve

Response.Write(Profile.Title)

Response.Write(Profile.Company)

 

However, if the user is logged in this codee just brings back their details, not those of the username requested. What am I doing wrong?


Get the user details based on the group

  

I am getting the details from groups but some groups have data but did not return any data is there any problem with this code. some groups have returned data .

CN=Tets App_Reviewer,OU=Tets Appl Groups,OU=District Wide Groups,DC=tets,DC=com;


Tets App_Reviewer is  the group name

public List<ADUserDetail> GetUserFromGroup(String groupName)
        {
            List<ADUserDetail> userlist = new List<ADUserDetail>();

            try
            {

                _directoryEntry = null;

                DirectorySearcher directorySearch = new DirectorySearcher(SearchRoot);

                directorySearch.Filter = "(&(objectClass=group)(SAMAccountName=" + groupName + "))";

                SearchResult results = directorySearch.FindOne();

Can I use managed client OM to retrieve user profile?

  
I don't think managed client object model can be used to get user profile. I don't see anything similar to Microsoft.Office.Server.UserProfile namespace...

ODBC API to retrieve User-Defined DataType of a Column in a ResultSet ?

  

Hi,

ODBC APIs such as SQLDescribeCol(), SQLColAttribute() could be used to retrieve SQLDataType of a particular column in a ResultSet.

Similarly, Is there any ODBC API which could be used to retrieve User-Defined DataType of a particular column in a ResultSet?

-Vengatesh

 


Retrieve user email address from text box

  
HI

I have an Technical Service Request InfoPath form and an email alert needs to be sent to two users each time that the form is completed and submitted to a library. An email alert needs to be sent to our technical manager which is a relatively easy workflow to set up in SharePoint Designer. The other user which needs to be alerted is the engineer which could be one of six people (we only have one technical manager).

The person completing the form will have to enter the name of the engineer to whom the alert should be sent to. I am struggling to send an email to this user. Is there a way to associate an email address with the name which is entered? We could use drop down lists and need to automate this in some way.

We dont need to retrieve full user information from AD but just need the email address of the user whose name is captured in a Text Box named 'Engineer'.

Any suggestions or assistance would be greatly appreciated,

Many Thanks
Tony

How to enable edit option for the user details in my settings

  
hi all,

I am new to SharePoint and SharePoint 2010.

I need to edit the user details when he is logged in, in my web Application, let me explain the scenario in detail.

1. User is log's in the application.

2. Clicks on "My Settings".

3. When the user views his details and clicks on the "Edit Item", then the user is not able to edit his profile but get only to "Attach File".

Checks performed by me:

1. Have checked is the user profile service is started for the current application or not (its started).

2. Have checked is the user profile synchronization service is started for the current application or not (its started).

Please help how can it be done as my site is not in the requirement.

thanks a lot for your help,

Arun Kumar :(

How to enable edit option for the user details in my settings

  

hi all,

I am new to SharePoint and SharePoint 2010.

I need to edit the user details when he is logged in, in my web Application, let me explain the scenario in detail.

1. User is log's in the application.

2. Clicks on "My Settings".

3. When the user views his details and clicks on the "Edit Item", then the user is not able to edit his profile but get only to "Attach File".

Checks performed by me:

1. Have checked is the user profile service is started for the current application or not (its started).

2. Have checked is the user profile synchronization service is started for the current application or not (its started).

Please help how can it be done as my site is not in the requirement.

thanks a lot for your help,

Arun Kumar :(


Get user details from Userid for not login member

  

I am using .net membership and have user profiles like firstname,lastname,address against each user.

My question is how to get user properties from their userid (Keeping in mind the user wont be login)?



Copy and Maintain Active Directory User details into mysql table using C#

  

For a given Domain name how can I retrieve the AD User details including a Unique identifier so that any changes to the user details including the username can be updated using the unique Identifier.

I can use System.DirectoryServices.DirectoryEntry to get the user details but not able to figure out how to work with the Unique Identifier to maintain the user details consistently.

Please provide me with some sample.

Thank you


how to programatically retrieve permission of a user on a list item?

  

Hi,

            is it possible to retrieve the permission of a user on a list item programatically.? i mean if a user has the rights Contirbute on the list item can i get that programatically that he has Contribute rights?

 please help. your help is appreciated.

 


Showing User Details with List view

  

Hi All, 

        Here is my scenario.There is a users table and each user has multiple addresses(one to many) and I want to dispalay them like the image provided below

using listview only.I am really stuck with the deign of the page.There is a show and hide feature also.I can use only list view that is my requirement.

Waiting for your Suggestions.(List view only)

Some helpfull links.....

Any kind of help will be appreciated.


Mr.ABC

SHOW/HIDE

 

Address1

Address2

Address3

 

 

 

 

Mr.XYZ

SHOW/HIDE

 

Address1

Address2

Address3

 

 

 

 


How can i retrieve declared product details from northwind with linqdatasource

  



Hello Guys,

I wan to retrieve spesific data from northwind and list in my compare page. 

in the first page i used gridview with checkboxes. all selected values get with session and then

send to my second page. I can display this values in the page but how can i retrieve all product details from my northwind db i dont know. 

here is my second page code behind. 

Imports System.Data.Linq
Imports System.Data.Linq.Mapping
Imports System.Windows.Forms
Partial Class Cart
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim retProductIDs As List(Of String) = CType(Session("ProductIDs"), List(Of String))
        For Each Str As String In retProductIDs
            Response.Write(Str.ToString)
            Response.Write("</br>")
            Dim str1 As String
            str1 = Str.ToString

        Next


    End Sub


and aspx page

    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        ContextTypeName="DataClassesDataContext" EntityTypeName="" 
        Select="new (ProductID, ProductName, SupplierID, CategoryID)" 
        TableName="Products&

Displaying Row Details Tooltip on GridView using JQuery

  
Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

MS SQL Server: Disconnect Users From Database - Kill User Session

  
If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Choosing Between a User Control or Web Part for SharePoint

  
SharePoint will only display Web Parts on a page. However, there are publicly available shims that allow you to write user controls and have them be displayed as a Web Part. From SharePoint's point of view, the shim is a Web Part. From the point of view of the user control, the shim is simply a control in .NET that is including the user control

Creating Sites/Lists/List Items under Current User Context in SharePoint By Using SPUserToken

  
Usually we do this by performing the action under RunWithElevatedPrivileges method and updating the listitem using SPListItem.SystemUpdate() method (see here). but this approach has its own flaws like (RunWithElevatedPrivileges will run under system account, we cannot use SystemUpdate for SPSite,SPWeb,SPList, since it runs under system we will "CreatedBy" by as SystemAccount).
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend