-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: vn_nilesh
Message 1 in Discussion
I am using a form view control. In the edit item template, I am using a check
box list control to display some options to the user. Users can select multiple
values from this list. When I try to programatically select the check boxes it
does not show in the browser. Following is the code I am using for selecting
the values
protected void FormView1_ItemCreated(object sender, EventArgs e)
{
FormViewRow row = FormView1.Row;
CheckBoxList chk = (CheckBoxList)row.FindControl("CheckBoxList1");
chk.DataSource = Roles.GetAllRoles();
chk.DataBind();
foreach(ListItem lstItem in chk.Items)
{
//check if user is assigned to the role
if (Roles.IsUserInRole(Request.QueryString["Name"].Trim(), lstItem.Text))
{
lstItem.Selected = true;
}
else
{
lstItem.Selected = false;
}
}
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]