Web Forms :: Select User From Drop Down List Based On Login Name

May 26, 2010

I have a drop down list bound to a column in a database. If a user logs into the website using the standard login controls, I want the drop down list to automatically select there name from the list. here is the code that doesn't work

[Code]....

The error orrcurs here:

[Code]....

Which intellisense says "Property Access must Assign to it's property or use it's values". Do I have the code all wrong? Also, as a side question, I don't understand why I have to use the TryCast find control option to find every control to use them. Even in the Page_Load if I type in DropDownList1 it says it's not declared.

View 3 Replies


Similar Messages:

MVC :: Receiving Data After User Select From A Drop Down List?

Apr 19, 2010

I have a drop down list that I'm suppose to get results according to user selected value ,

I can't figure out how to get the data in the target page how to manipulate it on the view. This is what I have tried

In the controller

[Code]....

this is my index file

[Code]....

this is my target page

[Code]....

as you can see i have tryed a few things but ...

One more question , am I taking the correct approach or is there another way to do it(passing data according to user selected item )

View 13 Replies

Web Forms :: Use LoginName To Select A Value In Drop Down List?

May 10, 2010

I have just got the login control working, and would like to grab the currently logged in username (I'm guessing via the loginname control), and then have the Drop Down list on the default.aspx select the matching name. The names don't exactly match so, I could hard code compare them via a select case or if statement, but the problem is I don't how to get the logged in username into a variable, and I don't know how to have the drop down list (which is databound) select the record.

View 4 Replies

Web Forms :: Drop Down Select List Is Not Showing Complete Text?

Oct 11, 2010

I have a drop down, the drop down select values looks fine in mozilla but it doesnot show the full content in IE6 and 7,8.My Code

<td >
<asp:DropDownList id="drpttrainer" runat="server" Width="150px" OnSelectedIndexChanged="drpttrainer_SelectedIndexChanged" AutoPostBack="True">

[code]...

View 5 Replies

Forms Data Controls :: Get A Drop Down List To Select A Field From A Table?

Mar 20, 2011

I'm trying to get a drop down list to select a field from a table.

Below is the code for my existing datagrid. I need the maintenance column on the end to be a drop down box fetching values from a datasource. I can sort the datasource bit myself i think

[Code]....

View 2 Replies

Select Login Page For Forms Authentication Based On Custom Rules?

Nov 18, 2010

i have a web site that uses forms authentication. the problem is that i have the site installed multiple times on the same production servers because i need to have a few different login pages (based on the domain in this case). after the domain specific login page, the rest of the site is the same. obviously, this requires a lot of maintenance as each new version has to be installed multiple times on the server (with varying the login page in the web.config file).

so i thought is there a way to install the site on 1 folder on the disk, have a web site on the IIS take in all the needed domains and make some http module (or some other solution) in which i could give it a list of domains and the forms authentication for that domain. this way make the login page used by each site change according to the domain while still having only one site to maintain on the server.

View 2 Replies

Button To Select Data From A Drop Down List?

Apr 22, 2010

I have a drop down list that populates information about the product from an access database (vb) when the user makes a selection. would like to have minimal product info on the home page so when the user selects the button for example 'view details' they will be taken to the product screen with the item already selected in the drop down list and information showing.

View 6 Replies

Web Forms :: Data Generation In Grid Based Upon User Drop Down Selections?

Mar 10, 2011

I am an newbie to this technology. I had requirement kind of thing, like, I had 5 cascading drop downs, which I created by using ajax control tool kit drop-down extenders, and used web-service to update the cascading drop downs content.

In the same form I need to create a grid, so based upon selection of the user, the grid should change dynamically, like I would like to have some examples kind of things, lets say, I had Four cascading drop- downs, like 1) Vehicles, 2) Hotels 3)Games 4) Year

And those can be sub-categorized to

1) Vehicles ----- Three Wheelers, Two Wheelers, Four Wheelers
2) Hotels -------- Five Star Hotels, Luxurious Hotels, Restaurants, Bars, Pubs
3) Games ------- Play Stations, Video Games
4) Year ----------- Manufactured or established in that particular year

so, If the user selects vehicles, then we need to show all the information regarding vehicles, and if he selects hotels , we need to get the information of vehicles, and hotels( * note, I may not be able to give u the right example, once again i want remind you that these drop downs were cascading drop downs, based upon one selection, other works) and like wise if he selects year, we need to show information of all the things manufactured or established in that particular year and here year is not a cascading drop down, and all these information is maintained in a single database table

And currently I am using Microsoft Sql Server 2008 R2, Visual Studio 2008, Using c#, ( i would be happy, if anyone gives me a code kind of thing, not mandatory, only if possible)...

View 2 Replies

MVC :: Create Drop Down List With Multi Select Capability?

Oct 28, 2010

I want to create a multi selected drop down list using ASP.NET MVC 2.

View 4 Replies

Web Forms :: Drop Down List, User Control, Getting Value Of DDL?

Nov 17, 2010

As the tree said to the lumberjack, "I'm stumped". I've been doing .net for years, and my brain is in vapor lock...Very simple here.. I have a user control which has a dropdown list, and a button on it. The DDL is databound. When the button is clicked, I want to retrieve the value of the dropdownlist. I check to see if the page is a postback and if not, I bind the DDL.I put my user control on my master page.When the button is clicked, the value of the dropdown is not obtainable. The selectedvalue is empty. I figure this has something to do with the order of the page being regenerated.

View 2 Replies

Select The Number Of Records / Rows To Display In The Gridview By A Drop Down List?

Dec 2, 2010

Is there a way to select the number of records/rows to display in the gridview by a drop down list

View 2 Replies

Web Forms :: Allow The User To Choose An Item, But Rather Than Populate Another Drop Down List Control?

Jun 22, 2010

I've got a drop down list that I want to populate with items from a SQL Server database, which I did successfully, but I can't figure out how to write an if statement that will clear the drop down list based on a selected index and repopulate it with data from another table. The drop down list is inside an update panel that auto posts back.

Basically I want to allow the user to choose an item, but rather than populate another drop down list control, i just want to repopulate the current one with new data.I'm guessing that if I want to get data from more than one table the code below isn't going to work for me. Could I get the data from all the tables at once and store each table data in its own variable until I need to use it? (Each table will have under 10 items, in 5 tables.)

Here is the code to get the data from the database:[Code]....

View 10 Replies

Web Forms :: Drop Down List Dependant On Selection In Another Drop Down List?

Mar 30, 2010

I have a drop down list that has the initials of about 12 of our sales guys.How can I make it so that when they select their initials from the list, the next drop down list only shows their customers.In my database there is a column for customer name and salesman.

View 6 Replies

Forms Data Controls :: Display Drop Down List When "Select" Link Button Is Clicked

Jul 20, 2010

I have a grid with an link button template field i also added a drop down list template field, i would like to hide the link button text (select) and display my drop down list for only the current row, when the link button is selected and capture the selected row (int row = gvstaging.SelectedRow.RowIndex;)

When the dropdown list SelectedIndexChange event fires i would like to access the value of the selected item(

DropDownList ddl = (DropDownList) sender;string
s = ddl.SelectedValue;) and pass the selectedrowIndex and value to another function

I know how to get selected row index , selected value from the ddl but dont know how to hide one and display the other only for a row and pass both values to the next step

[code]....

View 2 Replies

MVC :: Strongly Typed User Control On All Pages Based On Login Status And User Role

May 9, 2010

I want to display a menu (which will be strongly typed with it's own unique model) across all pages only if a user is logged in.What menu items are available depend on the user's role and also I'll need to hit the repository to get numbers like "x Messages", etc

Been scratching my head for a simple solution here. Don't want to create something that need changes all over the place.All my controllers derive from a BaseController, all my Models from BaseViewModel....probably where I'll be implementing functionality for this.

View 3 Replies

User Controls :: Disable Or Enable Menu Items Based On Login Type Of Logged In User

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

Forms Data Controls :: Built A User Control That Displays A Drop Down List Of States?

Mar 17, 2011

I built a user control that displays a drop down list of states. I'm using it, but if I try to put it in a listview control, all I get is the frop down with nothing in it.

View 3 Replies

C# - Select Item In Formview Based On Drop Down Selected Item

Jul 4, 2010

I am trying to get a drop down and a form view to work together. I've never used form views before. I also am using the entity framework to do everything. This is also my first time with it.

I want to be able to have a drop down, that is populate from the same data source as the form view. So far that works fine.

I then want to be able to change the drop down item, and it change the form view item that is displayed. I cannot figure out how to make this work.

View 3 Replies

Web Forms :: Display User Specific Information From Database - Based On Login ID

Jan 7, 2011

I have a online game (written in ASP) which i have finally decided to convert to ASP.NET. However i cannot seem to link the login ID's of users to their specific details in the database. I.E when Joe Bloggs logs in, he will be shown the team information for just his club, not every club. in ASP I use code similar to this below

[Code]....

im not convinced that is the right syntax to be using, but when i execute the code in Query Builder it is showing me the correct data (that i expect to see). So im wondering if there is something else im missing? Is there something extra that i need to be adding in Web.Config file or elsewhere?

View 30 Replies

Web Forms :: Change Contents Of Page Based On User Login Status

Jun 11, 2012

i want to change contents in content place holder based on the user logged in or logged out

View 1 Replies

Web Forms :: Get User List Based On Specific Profile Property

Sep 4, 2010

I am trying to query a DB and get a list of users based on a specific boolean property stored in the aspnet_profile for that user. I am aware that it wasn't possible a few years ago [URL] but was wondering whether that had changed in recent releases, or it was still not possible without trawling through the entire list of users and testing them one by one. (My DB may become way to big for that.)

View 3 Replies

Drop Down List In User Control Cause Full Page Postback?

Jan 14, 2011

I have the following scenario. I have a page that hosts several user controls. The user controls are all surrounded by a single update panel. All user controls have a save button on them. When the save buttons are clicked the page updates the update panel as expected. Some of the user controls contain editable list views. Whenever an action is taken on these list views, the Update Panel is NOT refreshed, but the whole page posts back. How can I get these ListViews to also refresh the Update Panel? I cannot post the code because of NDA. There are no javascript errors on the page reported by either IE8 or Chrome.

View 1 Replies

Trigger An Update Panel From A Drop Down List In User Control?

Mar 23, 2010

I have a user control in a master page with two drop down lists. When the user selects an item out of either ddl, I want to load a specific user control inside an update panel on the content page. I can't figure out how to get the user control to trigger the update panel.

Master

<%@ Register src="toolbar.ascx" tagname="toolbar" tagprefix="uc1" %>
<head id="Head1" runat="server">
</head>
<body>

[Code]....

View 2 Replies

Security :: Want To Redirect User Based On The Login ID?

Jan 26, 2010

i am using asp.net membership. when users arrive at my sight they can enter user name and password.

I then want to redirect them to a page called "MyAccountPage.aspx" which is unique to them. could someone post the c sharp code that I can use to capture the Unique Id of the user is it best to then pass this as a parameter to a control on the aspx page that displays data for that user. am I correct in thinking that I need a UserId column in my data table as well.

View 1 Replies

Web Forms :: How To Have 2 Cascading Drop Down Lists For The Same Drop Down List

Mar 12, 2010

How can I have 2 Cascading Drop Down Lists for the same Drop Down List?here is my problemi have 3 drop down lists read from database1- Schools List 2- Classes List3- Teachers ListEvery School will have more than 1 Class and more than 1 TeacherWhat I want is when user select a School from Schools Drop Down List then BOTH (Classes and Teachers) should be refreshed based on the School Drop Down List

View 1 Replies







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