Web Forms :: Displaying User's Profile To Another User
Jan 26, 2011I'm using .NET 3.5 and C#.
I am not using the .NET Profile Provider.
I'm using .NET 3.5 and C#.
I am not using the .NET Profile Provider.
I would like users to upload a profile picture when they register, and to then show that picture in a picture box control when they are logged in based on that specific user.
View 1 RepliesI am working on Social Networking Website. My problem is that
when new user will register he/she will get Pre-designed Profile page from where user can update profile.
I have to find User Profile property name programatically, not for a particular user, I have to find all properties name for all users at a time(not to iterate one by one) to display in webparts as columns.
View 1 RepliesI am using profile services to store some attributes of users registered in the website. Now I am making a display profile page for a user. The problem is that the profile loads easily when I am running the site from VS 2010, but it gives the following error when I run it from IIS7 on my local machine:
System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[Code]....
[code]....
I am making a Human resource Management system in which i have to make employee profiles, there is a page in which i am entering employee name and uploading a rofile picture and i want the next page to show that image on a left corner of every employee...after clicking on the submit button of the previous page !
View 1 Replies When a user wants to view another user profile on user profile page this error will show up
ERROR
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 72: protected void OnDataBound(object sender, EventArgs e)
Line 73: {
Line 74: string userName = (FormView1follow.Row.Cells[0].FindControl("hfUserName") as HiddenField).Value;
Line 75: string friendsUserName = (FormView1follow.Row.Cells[0].FindControl("hfFriendsUserName") as HiddenField).Value;
Line 76: string followStatus = (FormView1follow.Row.Cells[0].FindControl("hfFollowStatus") as HiddenField).Value;
HTML
<div class="text-center">
<asp:FormView ID="FormView1follow" runat="server" OnDataBound="OnDataBound" Width="100%">
<ItemTemplate>
<asp:HiddenField ID="hfUserName" runat="server" Value='<%# Eval("UserName") %>' />
<asp:HiddenField ID="hfFriendsUserName" runat="server" Value='<%# Eval("FriendUserName") %>' />
[Code] .....
This is how I edit the profile variables for a currently logged in user:
Profile.variablename = "this";
How can I do the same thing, but specifying the username whose profile variable I want to change, as opposed to just the currently logged in user?
Something like Profile.variablename.("username", "this") is what I'm looking for.
I'm using C# asp.net.
I am logged in as user1, and while creating a user in which I have additional information which would store first and last name into the profile database. I have the following code
[Code]....
But because I just have profile like that, it is updating the profile of user1 not the new user i just created
[Code]....
I got the followig task.Create a website (Profile.aspx) in which the User can create and edit his profile.Well, I know how to write in a database, but how do I get the UserName oder the UserID to make a PrimaryKey?If the user is logged in a session will be started. In this session is the UserName but I don't know how to read out the UserName with ASP.NET to make an PrimaryKey. If I would try to read out the UserName with C# I must save it in an variable and give it somehow to my form.
asp:sqldatasource id="SqlDataSource1" runat="server"
connectionstring="<%$
ConnectionStrings:MyConnectionString %>"[code]....
i have an admin page that displays membership info, like email, usename, lastactivity....., i need to add the telephone number from profiling.
i use this to get current but i dont need current i need it for the user whos ID is i a query string
[code]....
i,m workign on mailing project , and in a user table i added the UserImage feild in the user table and i uploaded the images to the database as bytes but it make the size of the database too large so i wanna upload images for users to a folders but link them to database table to use them when i make queries to retrive user image or user data like (Request.Querystring["ID"])
View 4 RepliesHow can I get any user profile form linkedin in our asp.net website....
View 1 RepliesI have a web site [URL] which had users profiles and accounts, and each user has his own user account name, I want once the user enter the url then his account user name after that to redirect him to his account page
ex. a user account name is xxx once he go to url [URL] it will automatically redirect him to [URL]
can we do such thing using HttpModule?
I want to use Profile Properties to keep some user information and move them between pages. I'm wondering if those profile properties are keeping data session based or when I assigned them is it same for all sessions/ Is this a safe method to use them:
<anonymousIdentification enabled="true"/>
<profile enabled="true">
<properties>
<add name="userid" defaultValue="" />
<add name="password" defaultValue="" />
<add name="username" defaultValue="" />
</properties>
</profile>
I am trying to query a DB and get a list of users based on a specific boolean property stored in the aspnet_profile for that user. I am aware that it wasn't possible a few years ago [URL] but was wondering whether that had changed in recent releases, or it was still not possible without trawling through the entire list of users and testing them one by one. (My DB may become way to big for that.)
View 3 RepliesI am using URL Routing to route user to his profile page, which is a child page. Now the problem is that all the images, javascripts references are distorted when i user the url to reach that page whether logged in or not logged in (both the cases). But after reaching this page when i login from this page thru my modal popup login control, all the references seem to work fine. It is to be noted that i am still in that same page which i reached after url routing. So upon logging from here the whole page works and displays fine.
How come the references are automatically adjusted when i am logging in from this page and are not referenced when i log in from other page and route here or when i am logged out?
Global.asax code:
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(RouteTable.Routes);
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.Add("UseridRoute", new Route
(
"profile/{user}",
new CustomRouteHandler("~/UserProfile.aspx")
));
}
I am using web parts using asp.net c# 2.0 with Ajax 1.0.
I am dynamically creating and loading web parts in my code behind. Some of these web parts are pure html others are user controls. Its all working well but with one annoying issue.
When I add a new web part / remove one ( from my web part collection) this change is not reflected in the portal. Say when you add a new web part you would expect it to see in the catalog. But its not there. When I remove a web part from my collection it still appears in the portal.
However, If I delete the user's setting in the aspnet_PersonalizationPerUser table then the change is visible!
im creating a multi step create user wizard for new members but I run into a problem. If the create of an account is in step 3 how do I capture the values from step 1 and 2. Should I try to pass the values to sessions or is there some other code. Here is some codebehind I tried so far (did not work).
[Code]....
[Code]....
I am using RPX for authentication. Now I get the user profile with identifier. What to do next to set authentication cookie and other things? Also the logout feature. in ASP.net 3.5 and C#.
View 2 RepliesI am trying to handle add a custom field to a user profile using CreateUserWizard.
I added the field to web.config as
<profile defaultProvider="SqlProvider">
<providers>
<add name="SqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="db"
[code]...
And added a ListBox to the template of CreateUserWizard. I wanted to add the information to the profile in the CreateUserWizard_UserCreated event. I can retrive values, but I can't figure out how to retrive the ProfileBase of the newly created user.
I have a website that acts as a common user details site for a few other websites. I pass a sersname to it and it gets the profile using
[Code]....
that part works fine. Now to commit the changes I use the above code to get the profilecommon for the user and then use oProfile.Save() to finish. This saves all the user data to my profile..doesn't matter which profile I use, it always gets saved to mine.
I am looking for an elegant (i guess as elegant as it can be) solution to caching a users profile on login (whether it is session, cache, cookie, etc) and keeping it in sync when a users profile is changed. How do you guys handle this? Just simply call a Flush() method in your Save() method that invalidates the cache?
View 1 RepliesI am trying to let a user fill in profile options when they are registering. I am using the providers that come with asp.net by default.
Example: User fills in this registration form:
Username
Email
Age <- This is what I have tried to add in.
Password
Confirm Password
I got the age to show up by doing the following.
1) Adding the following code to Web.config
<properties>
<add name="Word" type="String" />
<add name="Age" type="Int32" defaultValue="0" />
</properties>
2) Adding the following code to my register.aspx view
<div class="editor-label">
<%: Html.LabelFor(m => Profile.Age) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(m => Profile.Age)%>
<%: Html.ValidationMessageFor(m => Profile.Age)%>
</div>
I went to run it, I filled out the form and clicked register. I got this:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. and Line 127: _provider.CreateUser(userName, password, email, null, null, true, null, out status);
There is a CreateUserWizard. Is there an UpdateUserWizard somewhere for updating user profile? Please advise or direct to sample link.
View 1 Replies