cViewer.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Saturday, July 7, 2012
Multiple Eval Fields in Gridview ItemTemplate
<%#
String.Format("{0} - {1}", Eval("Name1"),
Eval("Name2")) %>
JavaScript URL encode
encodeURIComponent(str);
jQuery get specific option tag text
$("#list
option:selected").text();
Adding roles to the 'CreateUserWizard'
Add this to create user table
<tr>
<td align="right">
<asp:Label ID="RolesLabel" runat="server" Text="Roles" AssociatedControlID="DropDownListRoles"></asp:Label>
</td>
<td>
<asp:DropDownList ID="DropDownListRoles" runat="server">
</asp:DropDownList>
</td>
</tr>
And then this to code
protected void Page_Load(object sender, EventArgs e)
{
DropDownList roleDropDownList = (DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("DropDownListRoles");
roleDropDownList.DataSource = Roles.GetAllRoles();
roleDropDownList.DataBind();
}
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
DropDownList roleDropDownList = (DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("DropDownListRoles");
Roles.AddUserToRole(CreateUserWizard1.UserName, roleDropDownList.SelectedValue);
}
Subscribe to:
Comments (Atom)