DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 08 Aug 2007 06:43:49 +0200,    posted on: microsoft.public.dotnet.framework.aspnet.security        back       

Thread Index
  1    Mike
          2    Alexey Smirnov


Roles managemant and sellect from DropDownList problem   
Hi
I am using predefined membership and roles managemant approach
characteristic for framework 2.0  

Basic idea is that we select some value from DropDownList which
represents a role and we get all users for selected role.
This works and that is not a problem.

Problem is in DropDownList control...

I am using select value as follow:
string roles = DropDownList_Roles.SelectedValue;

Recieived items
---------------------------------------------------------------------------
        DropDownList_Roles.DataSource = Roles.GetAllRoles();
        DropDownList_Roles.DataBind();

For e.g. if I get following vales:
ABC
AAA
CCC
RRR
FFF

What is wrong?
-----------------------------
Whatever I select, I always getting first value, in this case value
ABC.

Thanks for help.

Mike
Date:Wed, 08 Aug 2007 06:43:49 +0200   Author:  

Re: Roles managemant and sellect from DropDownList problem   
On Aug 8, 6:43 am, Mike  wrote:

> Hi
> I am using predefined membership and roles managemant approach
> characteristic for framework 2.0  
>
> Basic idea is that we select some value from DropDownList which
> represents a role and we get all users for selected role.
> This works and that is not a problem.
>
> Problem is in DropDownList control...
>
> I am using select value as follow:
> string roles = DropDownList_Roles.SelectedValue;
>
> Recieived items
> ---------------------------------------------------------------------------
>         DropDownList_Roles.DataSource = Roles.GetAllRoles();
>         DropDownList_Roles.DataBind();
>
> For e.g. if I get following vales:
> ABC
> AAA
> CCC
> RRR
> FFF
>
> What is wrong?
> -----------------------------
> Whatever I select, I always getting first value, in this case value
> ABC.
>
> Thanks for help.
>
> Mike


Hi Mike

I guess it's a simple problem that is not related to security. You
have to select the item which has to be default

For example:

DropDownList_Roles.Items.FindByValue("CCC").Selected = true;

Hope this helps
Date:Wed, 08 Aug 2007 07:27:31 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us