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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to maintain username between 3 asp.net webpages & viceversa

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :ASP.Net
iam using 3 aspx webpages ,page1,page2,pae3 in page1  i am logining in using uesrname & password ..(where my user details are in table and checks for valid user ) once its valid iam moving into page2 where i want to dispaly welcome username, and also from page 2 iam moving to page 3 where also i want to dispaly username . and again i want to go back to page 2(were iam using hyperlink ) where i want to dispaly the welcome username, how to do this in multiple asp.net wepages......please help me out.....i knw pass the information using querystring ,session but how to do with page 3 to page 2 when going back to the page how tomaintain it iam confused..

View Complete Post

More Related Resource Links

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Some areas of the site usually contain less-dynamic information. Internal memos and corporate policies are common examples of this information. One option for this information is to post these documents in a document library. Documents in a library are often stored in a few different formats: Word, Acrobat (PDF), or HTML. Each of these formats has its drawbacks.

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

Enabling Users to Maintain SharePoint Content

When SharePoint is installed as a corporate intranet, there is a considerable amount of effort involved in maintaining the content to keep the site relevant. As we discussed in the first few parts of this series, SharePoint has many built-in features to reduce the burden on the site administrator.

Finding username


Im running a query where it selects a property from the user with the matching username but i dont know how to find out the username of the currently loggedin user.

Please Help!

Sending a File Using Email Helper in WebPages/Razor


Note: This is particularly with respect to Email Helper in WebPages/Razor. Please don't post links using System.Net.Mail object.

Following this tutorial: http://www.asp.net/webmatrix/tutorials/9-adding-email-to-your-website

Under "Sending a File Using Email" section what exactly is the code trying to do.

1: The SendFile.cshtml does not have any option to select file.

2: ProcessFile.cshtml is running fine. I am getting the email but no attachement.

I tried changing fileAttachment input to type="file" but not file is being sent to my email. I just get the message send in body.

Question: How exactly this file attachment works using Email Helper in WebPages.

Conversion of List to DataTable and ViceVersa


hi ,

           Iam having a requirement where I wil get datatable or Dataview from the DataAccessLayer I need to convert them into GanaricList of entites and ViceVersa from GenericList to Datatable or DataView.

             I tried it but I cant. Can anybody help me out.

Password recovery by entering email not username



I am using the ASP.Net password recovery control.  By default the user needs to enter their username before an email gets sent out to them.

If it possible instead of entering the username, email is used instead?  Alot of my users forgets their username but not email.


Get current username


Hi, I have the following code which I want to get the current username of the user logged in and use it as the @username parameter:

aspx file:

<asp:SqlDataSource ID="SqlDataRegionalUserAreas" runat="server" ConnectionString="<%$ ConnectionStrings:DevCPSdocshare %>"
        SelectCommand="SELECT d.doc_area_name
                        FROM document_area d,document_area_user_access a
                        WHERE a.doc_area = d.doc_area_id
                        AND and a.username=@username">
        <asp:Parameter Name="username" Type="String" />


aspx.cs file:

string username = Request.QueryString["username"];

Accessing Username, password, roles in xml file


Currently I am storing my username and password (passwordFormat="SHA1") credientails in my web.config.  I would like to figure out how to access them in an xml file that I have stored in my App_Data directory rather than the web.config file because I do not want my application restarting everytime I manually add a user (small list of 5 authorized users for the CMS section).

Here is what my web.config section looks like:


<authentication mode="Forms">
      <forms name=".Administration"

How to Pass UserName & Password to codebehind page using jquery

here is login form I would like to use.
Right now it is not communicating with my codebehind page.
How do I modify the jquery  login code to post the username and password to the codebehind?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" href="styles/chop1.css" />
<script type="text/javascript" src="js/chopjs/jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="js/chopjs/three.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="js/ie_png_fix.js"></script>

System.Data.SqlClient.SqlException: Login failed for user . Reason: The account is disable


Hi All,

Thank you for advance.

I created a widows service for mail schedule with c#.net and sql server 2005 and it is working fine for past one year.

now sometimes i am getting the "System.Data.SqlClient.SqlException: Login failed for user '<UserName>'. Reason: The account is disabled." error.

then i restarted the windows service manually and working.

what is the problem in my sql server connection and how to fix that issue?

How to setup db diagram to automatically insert username into table?

 I have a table setup in the database for users who are basically going to create a classified listing.  How can I setup a diagram that would easily create a table relationship with the Users table, so that it automatically inserts the users username when they submit a new ad?  If so, how?  I've tried adding a UserName row to my table and creating a relationship with the Users table "UserName" row, but it wasn't accepting the relationship when I tried to save the diagram...apparently because the UserName row in the Users table isn't a primary key?Also, one this is setup, what's the best way to provide the user a way to see a list of their ads and have the ability to edit them?

how do i create a windows form application login for to validate username and password from sql serv

 I would like to know how I can create a login form for my windows form application. The login form must be linked to a SQL server 2005 express edition database (in which the username and passwords are stored). The login form must validate the user using the database and allow them to access the program. 

How to get instance of "Microsoft.WebPages.InitPage"

I want to create an object of Microsoft.WebPages.InitPage,and it seems that i can't create it as normal like Microsoft.WebPages.InitPage intpage = new Microsoft.WebPages.InitPage();so how can I getting the object ?the code is a part of a c# function of a asp.net site.Who can tell me ?

How can I maintain "state" across WCF method calls?

I need to retrieve very large portions of NTFS files (as byte arrays) from a WCF Service.  The needed portions of the files are far too large to efficiently return in a single request, so I need a "chunky" implementation that will return just a portion of the file on each method call. But the entire process needs to be very fast... specifically: I need to avoid the overhead of re-opening the file each time the client requests the next "chunk". So how can I keep the filestream open on the service-side in anticipation of the next request from the client for the next chunk? And if no subsequent request arrives, then close the filestream? That is, implement "lazy close". Or stated another way: Does the code instantiated on the service-side to service an incoming method call remain "alive" after the method returns to the caller?  Or can it be configured that way, like a Singleton SAO behaves in Remoting?? Thanks, DT 

Maintain Controls State on Master Page.

I have Web Application which uses the Logged In User (Authenticated User) to query his Profile Data from Adabas/Unix using OLEDB. The application provides the user with about 21 different pages (Basic Info, Employment Info, Education, Dependants, Financial Info ...). The web application has a master page, and each profile data page is based on a User Control loaded in the Child ASPX Page. Since we are migrating our legacy applications from Adabas/Unix to SAP, the development Team has prepared web services to query for the same Profile Data from SAP using Web Services. Now, we have to modify the web application to consume the web services instead of using OLEDB to query Adabas. Since we are in the testing phase, and we have only very limited data in SAP, I have to provide temporary control to allow test query the Staff Profile for a Specified User (instead of the Authenticated User) and to select the Source: 1. SAP, or 2. Adabas.   So I am thinking to add the following "Control Section" in the Master Page:<div runat="server" id="divSAPTest" class="SAPTest"> <span>Test SAP Web Services. Enter Staff ID: </span> <asp:TextBox ID="txtSAPStaffID" runat="server" Width="60px"></asp:TextBox> <span>From: </span> <asp:DropDo

Display Full Name in SharePoint instead of Domain\Username

My SharePoint 2010 server started displaying the users with the Domain\Username standard instead of using Full Name (as it did up to yesterday). This in all pages of the sites (persmission settings, document libraries, tasks, etc.) Does anybody knows how to force SharePoint to display users with the "full name" standard? Thank you.Plo
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