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

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

Display/capture loginname value in textbox

Posted By:      Posted Date: September 14, 2010    Points: 0   Category :ASP.Net
Hi.I have a code here where the loginname will display the computer name.I have another textbox,where i want the same loginname value to be displayed in the textbox.Any ideas on how to do this,guys?Here's my code :<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate> <br /> <br /> <br /> welcome <asp:LoginName ID="LoginName1" runat="server" />//THIS LOGIN NAME TO BE DISPLAYED IN TEXTBOX 2 BELOW <br /> <br /> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>" SelectCommand="SELECT [ApplicationName], [LoweredApplicationName] FROM [vw_aspnet_Applications]"> </asp:SqlDataSource> <br /> <asp:FormView ID="FormView1" runat="server" DataSourceID=&quo

View Complete Post

More Related Resource Links

display color in textbox inside Gridview

Please let me know how to display background color of text box  inside a grid view.The Color value will be obtained from the DB.   eg. #00033

How Do I display only the last line of a Multiline TextBox when rows=1?


hi all,

This is the current code I am using:

                      <asp:TextBox ID="txtBoxComments" runat="server" MaxLength="5000" ReadOnly="true" Rows="1" Text='<%# Eval("Comments") %>'
                       TextMode="MultiLine" Width="100%" Wrap="true" />

 Thank you!


Trying to display only the last line of a Multiline TextBox


Hi all,

On my Asp.Net GridView I am binding a textbox to a field in SQL. Sometimes the content of the textbox is more than 1 line and I
need to show only the LAST line. How can I do that? Here is part of my code...notice that I use Rows=1 on purpose so that
I am able to show only 1 line but I need it to scroll all the way down and have it show only the last line of the whole content:

  <asp:TextBox ID="txtBoxComments" runat="server" MaxLength="5000" ReadOnly="true" Rows="1" Text='<%# Eval("Comments") %>'
      TextMode="MultiLine" Width="100%" Wrap="true" />

 Thank you!

regarding display textbox and image in same line using ajax ...


iam uing ajax to check availblity of username from sql. evrythng is working fine ...only the thing is the image i want to dispaly aftr the text using:http://encosia.com/2007/07/02/aspnet-username-availability-checking-via-ajax/ but how to display images aftr the text box...it displays in next line ..please can u help me ..how to display images next to texbox...

perform sum of textbox values and display the total in gridview footer row textbox


i have a gridview in which i have added two textboxes .

the second textbox is placed in footer of gridview

wht i want is when the user enters values in the first textbox the total of these textboxes should be displayed in footer row.

Pls help

Details should be display gridview's TextBox


Dear Friends,
   I am using gridwiew.
  To display Name, Sex, DOB, and Message(From SQL-server 2005)
   I want The message coloumn datails should be display in textbox(textbox placed in inside the gridwiew) 

display output to textbox


Hiiiii Frnds,

I have an sql scalar function (FN_GET_ENQ_NO()) which returns a unique enquiry no.

Now i want to display this enquiry no. to my asp:textbox on web page.

I have made all the connection strings to my sql server database. Even i had pulled the data from stored procedures. But clueless in above issue. 

How can i achieve this?

plz rep asap

thanx and regards

cancel/stop textbox display



I develop a C# code and read data from serial port and display it in a textbox;

I want to stop display if when I recive repetitive data. and when receive another data display start again.

Would you please help me?

May I?

Textbox Editable GridView in ASP.NET

This article describes how I made a fully editable gridview in C# using ASP.NET 2. The idea is that the GridView looks and works like an Excel spreadsheet. You see all the cells in the table, and you can edit any of the cells you like, and they are automatically updated (i.e. saved to the database). This is very often how people expect data tables to work in web pages, and I've often seen people clicking in vain on un-editable gridview cells, somehow expecting to edit them, and not understanding that they need to click an Edit button at the end of the row.

Highlighting Rows with TextBox OnFocus

In another article I explained that how you can make the rows of the GridView control clickable and highlight them when they are clicked. In this article I will explain that how you can highlight the GridView rows when you focus on the TextBox which is contained inside the GridView control.

GridView inline Master/Detail record display

This code drop is part of a smash and grab series. If you're in a rush, you can just grab this code and insert it into your application, no understanding is required. When you have some time (ya, right) you may want to review the source code.

Display data in gridview dynamicallay

I have AD domain which has 100000 users, I want to display all the users in gridview controls.Actually it is displaying users in gridview after parsing entire domain which takes around 30 min. I want to display the users while loading itself.It is continously getting user information from AD domain and getting each user details, I want to display the users information which already queried instead of waiting till getting all users information

asp.net display data in gridview

i want to display data in gridview binded to a sql datasource
but the problem part is i want to bind a field of that datasource to a dropdownlist and when a item is selected in that dropdownlist then correcposnding to that data will be displayed in gridview...

display data into GridView from excel sheet

I have to display data from excel sheet into my gridview and also I need to figure out a way to store data into excel files from my web page. I am using C# 3.5, VS 2008.

Display Related Data in an ASP.NET GridView

Typically when you display a datagrid you will want to show data from a related table. There are 3 different ways to accomplish this with NetTiers. You can use a custom stored procedure, deepload functionality from the code behind, or a strongly typed datasource control. We'll provide an example of each

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code
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