Control Display Names - Web.Config

I am developing an application which displays the Name of the user. The name information is coming either from windows logon account or from MS outlook. My job is to display the name of the user as First Name, Last Name format or Last Name, First Name format. The application should pick one of the formats based on the WEB.Config settings.

If you got any suggestions please share with me...

 

Warm Regards,
Thiyasoft

0
thiyasoft
3/12/2007 3:16:43 AM
asp.net.security 27051 articles. 1 followers. Follow

3 Replies
659 Views

Similar Articles

[PageSpeed] 0

In your web.config add something like: 
from your page read the setting with say: 
string nameFormat = System.Configuration.ConfigurationManager.AppSettings["NameFormat"];
now depending on the value of nameFormat display the name as needed.

string displayName = "";
if (nameFormat == "Last") 
{
  displayName = lastName + firstName;
}

else
{
 displayName = firstName + lastName ;

}

HTH
0
addie
3/12/2007 7:48:21 AM

Thanks For your Reply...

Is it possible for me to do changes in my Javascript based on the web.config file settings.

Warm Regards,

Thiyasoft 

 

 

 

0
thiyasoft
3/12/2007 10:49:18 PM

Considering I know almost nothing about what you are actually trying to do, one thing that I can think of is, when you are loading the page get the Web.config setting into some hidden control and then when executing the Javascript get the value from the hidden control...

 

0
addie
3/13/2007 5:00:22 AM
Reply:

Similar Artilces:

[PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config
Here's a test suite for Net::Config. In the process of writing this, I've fixed an apparent bug that prevented single values from becoming array references when necessary. I think it's right, but perhaps Graham should weigh in on this. In the process, with some advice from perl-qa, I've added a mock object so the test could control the output of Socket::inet_ntoa() and Socket::inet_aton(). t/lib/Mock/ seemed like as good a place as any. I'm happy to rework this patch if it personally offends anyone whose opinion matters. :) -- c --- lib/Net/~Config.pm S...

Displaying Controls based on security roles
Hi all I have a web app using the .net forms authentication. This is the process at present. To login user goes to login.aspx (stand-alone page) which redirects to Default.aspx which uses a master page template.master Once logged in, I want to either display or hide controls based on the users role. e.g. Template.master page Label: <asp:Label id="Label1" runat="server" Text="Hello World" /> Code behind for template.master:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then If ...

.NET control is displayed only on mouse hover
  Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 ...

UserName Control does not display user name
Hi, What settings in IIS will enable authenticated user info? I was installing membership authentication on my site and everything seemed to be working correctly. I could use the LoginStatus, UserName and ChangePassword controls. Then I must have changed some setting because now they don't work. So, I stripped the site down to 2 pages  a login page with the login control and a secure page with a LoginStatus and UserName control. I am able to log in with a user name and password and get directed to the secure page but it still displays "login" and does not display username. ...

superreview granted: [Bug 288906] Return null for MSAA name when no name explicitly set for HTML form control : [Attachment 179538] If no name explictly set for form control, use SetIsVoid(null)
neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> has granted Aaron Leventhal <aaronleventhal@moonset.net>'s request for superreview: Bug 288906: Return null for MSAA name when no name explicitly set for HTML form control https://bugzilla.mozilla.org/show_bug.cgi?id=288906 Attachment 179538: If no name explictly set for form control, use SetIsVoid(null) https://bugzilla.mozilla.org/attachment.cgi?id=179538&action=edit ...

superreview requested: [Bug 288906] Return null for MSAA name when no name explicitly set for HTML form control : [Attachment 179538] If no name explictly set for form control, use SetIsVoid(null)
Aaron Leventhal <aaronleventhal@moonset.net> has asked neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> for superreview: Bug 288906: Return null for MSAA name when no name explicitly set for HTML form control https://bugzilla.mozilla.org/show_bug.cgi?id=288906 Attachment 179538: If no name explictly set for form control, use SetIsVoid(null) https://bugzilla.mozilla.org/attachment.cgi?id=179538&action=edit ...

The LoginName control doesnt display the logged in name!
Hi All, I have a master page with the following code in it: <asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate> Welcome back <asp:LoginName ID="LoginName1" runat="server" /> I can login to the website and access areas I couldnt if I wasnt logged in. The LoginView changes to the logged in version but all I get is "Welcome back", ie with no login name. What am I doing wrong? Danny I've got a similar scenario which works ok for me.  I can't see any obvious differences between the two but here's my code anyway. HTH. <form id="form1" ru...

security exception while displaying obout grid control
Hello!When I would like to display an aspx web page with a simle obout grid control, the web page says:Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' ...

Naming Controls with a variable Name
How can you name a control like my example below where var gives each textbox a different name? <% Dim var as Integer %> <% For var = 1 to 15 Step 1 %> <p></p> <asp:TextBox ID="textbox" runat="server" /> <% Next %> so something like this <asp:TextBox ID="textbox + var" runat="server" /> Hi Nick, The following code does what you want.<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load( ByVal sender As Object, ByVal eArgs As...

Name (control name) is not declared.
I get an error with every control I put in an ASP.NET page and try to reference in the code-behind file, that says "Name (name of control) is not declared.", even though the control is properly referenced with the correct name which I named it in the .aspx file. What is the deal? Does VS2005 Express not explicitly declare web controls in the code-behind file? If you add a control to your page and it has the runat attribute set to server, you can reference to it with the name you have specified for its ID attribute./Fredrik Normén - fredrikn @ twitterMicrosoft MVP, MCSD, MCAD,...

HTML Control Name and Id modified of by .Net
Hello...Can someone help me with this little problem?I have a Master Page. And with it I did create a new aspx page.Inside the asp:content of this new page I put a form and some code like this one:<label for="Offices" runat="server">Office: <select id="Offices" runat="server" /></label>In the PageLoad of the page I did fill the select. All is OK at moment.The problem is that .Net changed the name and id of the Select.The HTML generated is here:<label for="Oficinas">Oficina:   <select name="ctl00$conte...

Validation controls displayed over other controls
Does anyone know of away to display a validation control on top of a dropdownlist? Or any other ideas on how to display an error message on top of a dropdownlist. I'm a novice at this so please don't get too deep in programming. Hi, first of all, most people are used to see validation controls, being it either in a web application or a winforms application, right of the control that needs attention. Being said that you could use the z-index of CSS to display a <span> or <div> tag above your control and put the validation control inside that html tag that you display above y...

Changing the toolbox display name of a custom control
Hi, Can anyone help me in changing the toolbox display name of a custom server control?i tried using the following code, but its not working. [ToolboxItem(typeof(ClassName)),DisplayName("NewName")] Thank you, Senthil Kumar Hi, From your description, it seems that you want to modify the server control display name in the toolbox, right? If so, I think you need to open the customer server control project, and in the source code of that server control, change the line in bold, and build again. namespace WebControlLibrary1{    [DefaultProperty("Text")...

Custom server control display in Studio.NET
I have a custom web server control that I have implemented a control designer using a simple designer: Public Class TPLDesigner    Inherits System.Web.UI.Design.ControlDesigner    Public Overrides Function GetDesignTimeHtml() As String       Dim sw As New StringWriter       Dim tw As New HtmlTextWriter(sw)       Dim cControl As TimePickList = CType(Component, TimePickList)       cControl.RenderControl(tw)     &n...

variable name in control name
I have the below code that needs to be repeated for every day of the week. Without repeating the code, how do I use a variable name for the dropdownlist control? What I mean is , if I have a  loop that will run 7 times the same code, only difference being, the name of the dropdown control needs to be tweaked for each iteration? How do I do that? Thanks for your help. For ex: for saturday, the name of the control is    DropDownListWeek1SatTimeout1 for sunday, the name of the control is DropDownListWeek1SunTimeout1   Dim timelapsed As ...

Web resources about - Control Display Names - Web.Config - asp.net.security

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Atlassian battles Slack for control of the modern workplace
Atlassian went public only a week ago, and already a new front has opened up in its battle with a key competitor.

Victoria bushfires: Out-of-control blazes in Victoria as heatwave continues across southern Australia ...
Victoria's Country Fire Authority says houses are likely to be impacted by a 3,000-hectare bushfire west of Melbourne.

Stringify your life by taking control and automating tasks
... Adobe Post or If you can think it, you can create it in Scribblenauts Unlimited . Stringify IF by IFTTT Stringify your life by taking control ...

How to engage Tesla's Launch Control mode
Filed under: Green , Videos , Tesla , Electric Short video shows Model S keeping it straight on a rain-slicked road.

Tencent Holdings Takes Full Control of 'League of Legends' Developer Riot Games
Breitbart News Tencent Holdings Takes Full Control of 'League of Legends' Developer Riot Games Breitbart News Riot Games, the creators of ...

China's Xi on cyberspace control
Chinese President Xi Jinping defended his country's right to censor Internet content, signaling confidence in the strategy.

San Bernardino Gun Control Poll
Would Tougher Gun Control Laws Prevent Mass Shootings In California? [question q=”1″] [email][submit] *Completing this poll entitles you to Daily ...

'Transparent' Breakout Hari Nef Takes Control of Her Story One Instagram at a Time
'Transparent' Breakout Hari Nef Takes Control of Her Story One Instagram at a Time

Google Updates BigQuery With New Cost Controls
Enterprises using BigQuery to run analytics against large data sets can now set a daily query quota on a project-wide or an individual basis. ...

Resources last updated: 12/19/2015 7:32:47 AM