Displaying Only Records Of The User Who Has Logged In?
Mar 14, 2010
I have a database called TASKMASTER which holds task related details of all employees and which has a primary key TASK-ID.I also have a table called called employeemaster which holds employee records and which contains username and password as well as the primary key employeeid.employee ID is a foreign key in taskmaster.
Now when i log-in with my username and password it should direct me to a page which shows only tasks assigned to that employee who has logged in...i am using gridview for displaying task records....how do i implement this?
View 2 Replies
Similar Messages:
Feb 9, 2011
this is basically to show a welcome message [welcome user]on the index page after login in as a registered user of my site. i can achieve this with session but i really want to see this work. i read it in a book. it is not working as i want instead it is displaying my pc's name, instead of showing welcome for the current loggrd in user. put into consideraton that i programmatically created my login controls, my database on sqlserver myself, without asp.net custom login controls.
//this is the label that shows the welcome text
{welcomeLbl.Text = "you are welcome, ";
//user.identity.name+"."; this is suppose to display the name of the current logged in user
welcomeLbl.Text += User.Identity.Name + ".";}
View 2 Replies
Sep 21, 2010
I having problem in display the username after a user logged in.This is my master page which has label which named Label1 on top right, i want to display the username on there after logged in.
View 4 Replies
Aug 3, 2010
The project is a default ASP.net Website built in vs 2010. I am new to asp.net and was just experimenting with the master page to only show a menu when logged in.
I have the following in the master page.
[Code]....
The AnonymousTemplate works fine. However when I log into my user the entire menu disappears. I have searched the web and the results were to look at my web config auth tag which looks like this.
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
What am I doing wrong?
PS. I have also tried to set the MENU IDS to the same name and that is not working either.
View 1 Replies
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
Jan 7, 2011
I deployed a website where a logged user or an anonymous user can select data and download a XML file. The website generate the XML file in the server and then deliver it.
It works fine in my development environment, but after deployment, the anonymous user can download the file, but the logged user receive this error:
System.UnauthorizedAccessException: Access to the path 'd:HostsLocalUserheringerwebsiteUpload20110107094051.xml' is denied.
It is weird that as anonymous i can do it.
The website server help states this:
"Grant write, modify, delete access rights on website's folder
Your website executes under unique user account that by default has full control over the website's folder.
So your application can create, open, read, write and delete files and folders inside of your root folder.
There is no need and no way to change this permissions.
If, when running ASP.Net application, you still unable to create file or update it, you have to check your Web.Config file for "<Identity impersonate..." tag and remove it.
The only exception is when the application tries to modify a file or folder in "Application_Start" event of Global.asax file. This is by design that user authenticated only after the Application_Start even. Before the user is authenticated your website runs under an identity of Application Pool which is "Network services". That account doesn't have access to the folder of your website.
To make it work you eather have to move the code that tries to modify files or folders out of the "Application_Start" event of the Global.asax file or inside the event you'll need to impersonate your user by code."
But i am not using impersonate and the tag is not in my web.config.
View 2 Replies
Mar 4, 2010
I have the membership provider and the create user with tow steps, one of the steps contains a custom registration form, for each created user data will be in the database, and there is an account page shows the data that the new created user did insert during the registration process on the custom registration page,
the problem, when the user is created and logged into his account page, this account page shows only the information for the first created user, not the info on the logged in user , but the logged in user data still saved in database and not showing on his account page?
This is web.confg code:
<?xml version="1.0"?>
View 22 Replies
Jun 6, 2013
I have table called ROLE with fields (id,name,permission) example values (1001,madhu,hr)
I have another table called LOGIN with fields(id,DOB,password) example values(1001,24101989,madhukumar)
What i want is , if i login using the LOGIN table ,it check the id and permission in the ROLE table , if the permission is 'hr' it enable to access the menu , or if the permission is any other it just print the error message ("no permission")
Note: menu is placed in master page , but login is not in the master page ...
View 1 Replies
May 7, 2015
I've made a membership by create user wizard. everything is good but after click on finish register button, when page redirect to index .aspx, this page thinks tht user logged in. whereas user didnt login just added to DB.here is the code:
protected void CreateUserWizard1_NextButtonClick(object sender, WizardNavigationEventArgs args)
{
try
{
Membership.CreateUser(CreateUserWizard1.UserName, CreateUserWizard1.Password, CreateUserWizard1.Email);
Response.Redirect("index.aspx");
[code]...
in index.aspx just have a login name and login status control. tht's it.
View 1 Replies
Sep 1, 2012
Query = "select * from register ";
SqlCommand cmd = new SqlCommand(Query, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows) {
while (dr.Read()) {
lblid.Text = dr["mcode"].ToString() + " - " + dr["fullname"].ToString();
}}
I have the above code
Only the first record gets displayed. All the records needs to be displayed.
View 1 Replies
Apr 2, 2010
I would like to change the logged in user to another user temporarily to do some process.
For example, say I am logged in as "Joe". In my method, I want to make the logged in user from "Joe" to "SuperUser", do some process, then change the logged in user back to "Joe".
View 3 Replies
Nov 9, 2011
I am doing a project where I need to be able to pick a records from a dropdown list and then have the rest of the records in the database display below in a table.
I attached an image of what i have so far which is the dropdown box and the table of data, but whenever i pick another item from the dropdown box it doesnt update the data listed below.
View 8 Replies
Jun 15, 2010
using vb.net/asp.net 2005 and SQL Server 2005 In my vb.net code I am setting the select statement for SqlDataSource1 and after that I am setting the DatasourceID for my gridview called grdGV (see below). However no rows are being displayed in the grid and the Rows.Count that I am printing out is 0. But when I taked the SqlDataSource1.SelectCommand printed out in my response.write statement below and query this in my SQL database I see 2 records being returned. So I am very puzzled why the database will return 2 records but the same exact query that is set in the SqlDataSource and then bound to the grid does not return 2 records?
I have also checked the DataSource.ConnectionString and it matches the database I am using.
[Code]....
View 4 Replies
May 13, 2010
a table with related records (above is showing tapes, with different shots on the tapes). I already have the tapes data with the URLs working so not worried about that - just how to show the related information. Doesn't have to be exactly like this - but all the information must be visible at the same time ie no click to view or hover over.
View 2 Replies
Nov 4, 2010
I have the following search query
// GET /Home/Results/
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Result(string searchtext)
{
var search = (from n in _db.NewsItemSet
where n.headline.Contains(searchtext)
orderby n.posted descending
select n);
return View(search);
}
}
The search works and displays a record if a record containing a keyword exists, I am struggling however to implement a feature where when the search is returned it says for example:
0 news items found
N news items match your search criteria: 'string'" displayed
View 6 Replies
May 24, 2010
One of my module fetches data from Data base and no of records it min expects to return is 90000 and I am not supposed to use paging on the page which means all record i need to display on one page.
since no of records are very high I would like it to show records in such a way that if after every 10 records are fetched it gets added to Page and shows an line saying Processing...
View 2 Replies
Jul 16, 2010
my jqgrid is working fine.but one problem is by default jqgrid is displaying all records even if page size is 2 or 4.. and it is showing page 1 of 0
View 1 Replies
Feb 6, 2012
I have custom paging for a grid with first next prev last. My issue is with current code it takes a lot of time for post back & going to next page & displaying records, even page loading takes time, so I needed to load the records on request....
Means suppose the pagesize is 50 records per page on initial page load only 50 records will be displayed from database instead of all say 2000 records & then when user clicks next next 50 will be loaded from database to grid & so on .....
View 1 Replies
Aug 20, 2010
is there anyway I could create a function that receives and username and the function returns if the user is currently logged in into the application?
View 2 Replies
Dec 16, 2010
I have written in the old ASP for year and just started two weeks ago with .net, It has taken some adjustments. I am learning using Web Dev Express. Anyway, Here is my question.
I am learning by creating a simple progam to track boxes associated with cases(litigation) IE Smith v Smith case has files in 3 boxes.
two tables
[code]....
View 2 Replies
Oct 14, 2010
I have a webpage which displays content drawn from a single record in a database table. I've been asked to change this so that the content displayed alternates between 2 records each time the page is requested by a browser (I guess this would equate to each PageLoad event).
The records to be displayed are chosen on the basis of two dates, a beginning date and and ending date, that define a time period in which the record is to be active. The table containing these records has 2 columns containing these dates (begin date is contained in "dtDisplay" and end date is "lastDisplay."
I'm not sure how to amend the existing code behind to make this happen. Here is the c# that I inherited from a developer who is no longer available.
[Code]....
View 13 Replies
Jun 3, 2013
I want to limit the records to 18 in every line, then the next records goes to the nextline?
<asp:Repeater id="Repeater2" runat="server" >
<HeaderTemplate >
<table border="1" width="100px">
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="litRowStart" runat="server"></asp:Literal>
[code]....
View 1 Replies
May 10, 2010
when the user comes to the login page I need to validate whether he is already logged in or not..how I can validate it..can anyone give sample.
View 3 Replies
Oct 25, 2010
I thought this would be a simple task as I am trying to get the current logged in domain user name. I have the following:
[Code]....
but it ALWAYS returns nothing ""
Is there some configuration in the ASP that I have to do first?
View 3 Replies
Sep 1, 2010
Our users are only only allowed to log into our site from one location at a time. If they attempt to login from a second location, how do I log them out of the first location?
View 1 Replies