Data Controls :: User To User Profile View Showing Error

Apr 27, 2016

 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] .....

View 1 Replies


Similar Messages:

Forms Data Controls :: Showing User Details With List View?

Nov 26, 2010

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.

[code]....

View 2 Replies

Web Forms :: Profile Service Error - Unable To Load User Profile In Iis?

Jan 3, 2011

I 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]....

View 4 Replies

User Controls :: Display User Profile Image Of Logged In User?

May 7, 2015

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 Replies

User Controls :: Upload Image And Display On User Profile Page?

Jan 8, 2014

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

Security :: When The User Logs In Then They Are Able To View Their 'profile' Such As Their Name, Address Etc?

Jan 13, 2010

I've been trying to work out this error for a while now and i still dont understand it because i have been following a tutorial online step-by-step but i recieve this error when i log in ?

What i am trying to acheive is when the user logs in then they are able to view their 'profile' such as their name, address etc. The login is validated against a table in a database, ...this is the error i am recieving:

Description: An unhandled exception occurred during the execution of the current web request. 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:

[Code]....

View 3 Replies

Security :: Select User View Only Noticesselect User View Only Logsselect User View Only Newsetc?

Feb 14, 2011

have a web in which there are different areas i have a 1 admin which manage all things like news, Events, Notices, Logs, Forums, Publications etc.........i want assign user rights that select user view only Noticesselect user view only Logsselect user view only Newsetc....

View 7 Replies

DataSource Controls :: Sql Server Authentication Showing An Error 'Login Failed For User?

Jun 15, 2010

while i was using sql server authentication, it was running a quite good but suddenly it starts showing an error 'Login Failed for user sa'

Here is my error-Login failed for user 'sa'.

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.Data.SqlClient.SqlException: Login failed for user 'sa'.

Here is my code-

<add name="MyDB" connectionString="Data Source=ERPTEST;Initial Catalog=LoginDatabase;User ID=sa;Password=sa"
providerName="System.Data.SqlClient" />

View 2 Replies

User Controls :: Automatically Reset User Session Without Showing Any Message When Using Master Page

May 7, 2015

URL.... Still there will be need of url in ajax method if i put javascript in site.master.cs . As what i have understood from  that mysite.master.cs will be like this :

protected void Page_Load(object sender, EventArgs e) {
try {
if (Session["Prefix"].ToString().Trim() == "sys_admin") {
UserNameMasterLabel.Text = Session["UserName"].ToString().Trim() + " (ADMIN)";

[code]....

And site.master will be like this :

And I have to put next method in DailyLog.aspx page ? like this

System.Web.Services.WebMethod(EnableSession = true)]
public static int RefreshSession() {
HttpContext.Current.Session["Name"] = "BSD";
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/Web.Config");
SessionStateSection section = (SessionStateSection)config.GetSection("system.web/sessionState");
int timeout = (int)section.Timeout.TotalMinutes * 1000 * 60;
return timeout;
}

But I have several pages in my website , by doing the above story will it work for Builder.aspx ? or any other page rather than dailylog.aspx ?

View 1 Replies

Security :: Create A Company Directory Useing A Grid View To Display Every User And There Profile Information?

Aug 10, 2010

I am currently useing forms authenticantion with users set up with the Membership API and I have there other information like first name and work phone number stored useing the Profiles API. I want to create a company directory useing a grid view to display every user and there profile information. I can use Membership.GetAllUsers() or ProfileManager.GetAllProfiles() but it does not list any of the custom profile information like name and phone. What is the best way to get a grid view to show all the user information?

View 7 Replies

Web Forms :: When New User Register / Get Pre-designed Page From Where User Can Update Profile?

Apr 20, 2010

I 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.

View 5 Replies

C# - How To Edit User's Profile Variable (from Web.config) While Specifying User

Sep 24, 2010

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.

View 1 Replies

Web Forms :: How To Get User Profile Property Name For All User Programmatically

Aug 25, 2010

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 Replies

Security :: Creating A Profile For A New User Is Updating Other Profile

Feb 4, 2010

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]....

View 5 Replies

Web Forms :: Displaying User's Profile To Another User

Jan 26, 2011

I'm using .NET 3.5 and C#.

I am not using the .NET Profile Provider.

View 1 Replies

User Identity Name Showing Windows User Instead Of Network Service?

Jun 28, 2011

In the IIS, it shows that the web app (i'm using) is using an application pool that uses NETWORK SERVICE account for identity. But when I debug/run my web app, User.Identity.Name shows that my windows user login instead. I checked my web.config file, and it does not have Impersonate enabled. In fact, I set it to false, and it still shows the same.

View 1 Replies

User Controls :: Microsoft SQL Server 2008 R2 Error 18456 - Login Failed For User Sa

Nov 21, 2012

Microsoft sql server error 18456 in sql server 2008 r2login failed for user   sasql server was working properlyi just restarted the system and then i started getting the above errorhow do i resolve iti am able to login with windows authentication but not sql authentication....

View 1 Replies

Data Controls :: How To View Only The Information Entered By User On Login

Dec 3, 2013

Being in the learning phase of development in asp.net vb and sql server 2008...

the question m asking  might seem to silly for many....

I have a login and a registration form for users... i hv done it

but my question is

1.how do v validate a user  once he is registered

2.how can we show the details he had enterd while registration on his next login...

for example in facebook once registered the user can see his profile pic his profile info every time he logs in...

actually m nt able to create links between different tables storing various info. about users in database..

View 1 Replies

Forms Data Controls :: Want The User To Click Details And It Give Me A Pop-up Showing Details Of The Particular Row

Mar 11, 2011

I have a gridview control with a details column. I want the user to click details and it give me a pop-up showing details of the particular row. Any idea on how to do this using JQuery?? Looking for an example with code..

View 1 Replies

Forms Data Controls :: Dynamic User Control With A Grid View?

Dec 13, 2010

I am dynamically loading user controls into my main page on button event.The user control has a textbox and a gridview When i enter data in textbox , the autopostback event fires and loads data into the gridview. when i load another instance of user control and do any post back the gridview data is not persisting.Until and unless I bind the data, gridview is not having any data after postback.This is creating issue when I al updating a row in gridview as data is not persisting after postback.

View 8 Replies

Data Controls :: Render Partial View Based On User Input In MVC

Jan 24, 2016

I want to know that how to render partial view based on where the user navigates. I mean to say if user navigates to Home/index it will load different partial view and if user navigates to Home/contact it will load different partial view on the _layout page. 

View 1 Replies

MVC :: How To Retrieve User.Identity.Name From View User Control

Jun 9, 2010

i currently work on an asp.net mvc 2 project and noticed that inside an asp.net mvc view page i can get the user name authenticated via User.Identity.Name, but if i try to use the DsiplayFor method in order to display my model from a view user control, it just does not exist. Could i pass this parameter to my model using additional ViewData parameter that comes with DisplayFor html extension?

View 2 Replies

Web Forms :: Create A Profile In Which The User Can Create And Edit His Profile?

Jun 25, 2010

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]....

View 4 Replies

Security :: How To Create User Profile In Multi Step "create User Wizard"

Jun 9, 2010

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]....

View 1 Replies

Forms Data Controls :: Enable Del Button For Specific User In Grid View?

Jan 24, 2010

I have following grid view and in it item template button2 now i want to make it enable only for some specific value say for session or some userid.so that only specific user can del the record.

<Columns>
<asp:CommandField ShowSelectButton="True" ItemStyle-Width="5" />
<asp:TemplateField HeaderText="del" ItemStyle-Height="100" ItemStyle-Width="50">
<ItemTemplate>

[Code]....

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved