Assigning new users to a rolehttp://forums.asp.net/t/1786178.aspx/1?Assigning+new+users+to+a+roleSat, 28 Apr 2012 12:00:09 -040017861784903342http://forums.asp.net/p/1786178/4903342.aspx/1?Assigning+new+users+to+a+roleAssigning new users to a role <p><br> Hi there, I'm pretty confused regarding assigning new users to a role. I've clarified it in web.config.&nbsp;</p> <p>Now left adding in : Roles.AddUserToRole(CreateUserWizard1.UserName,&quot;NewUser&quot;);</p> <p>Do I have to create a new class for this or just add it straight to</p> <p>&nbsp;</p> <pre class="prettyprint">protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e) { }</pre> <p>I'm a beginner.&nbsp;</p> <p>THanks</p> 2012-03-28T08:22:17-04:004903371http://forums.asp.net/p/1786178/4903371.aspx/1?Re+Assigning+new+users+to+a+roleRe: Assigning new users to a role <pre class="prettyprint">&lt;asp:CreateUserWizard ID=&quot;CreateUserWizard1&quot; runat=&quot;server&quot; Width=&quot;435&quot; OnCreatedUser=&quot;CreateUserWizard1_CreatedUser&quot; CreateUserButtonType=&quot;Link&quot;&gt; public void CreateUserWizard1_CreatedUser(object sender, EventArgs e) { Roles.AddUserToRole(CreateUserWizard1.UserName, &quot;Members&quot;);</pre> <pre class="prettyprint">}</pre> 2012-03-28T08:33:27-04:004903401http://forums.asp.net/p/1786178/4903401.aspx/1?Re+Assigning+new+users+to+a+roleRe: Assigning new users to a role <p>The name &quot;Roles&quot; does not exist in the current context.</p> <p></p> <p>please advice. thanks</p> 2012-03-28T08:44:28-04:004911593http://forums.asp.net/p/1786178/4911593.aspx/1?Re+Assigning+new+users+to+a+roleRe: Assigning new users to a role <p><span class="sent_en"><span class="46-2-1" title="">Did</span> <span class="46-1-1" title=""> you</span> <span class="46-3-1" title="">add</span> <span class="46-4-1" title=""> references?</span></span></p> <p>using <span face="Consolas" size="2" style="font-family:Consolas; font-size:small"> <span face="Consolas" size="2" style="font-family:Consolas; font-size:small">System.Web.Security;</span></span></p> <p><span class="sent_en"><span class="46-4-1" title=""><span face="Consolas" size="2" style="font-family:Consolas; font-size:small"><span face="Consolas" size="2" style="font-family:Consolas; font-size:small"></span></span></span></span></p> 2012-04-02T10:50:36-04:004956182http://forums.asp.net/p/1786178/4956182.aspx/1?Re+Assigning+new+users+to+a+roleRe: Assigning new users to a role <p>Do I have to create a new class for this?&nbsp;</p> <p>For the Roles.AddUserToRole(CreateUserWizard1.UserName,&quot;NewUser&quot;); method?</p> <p>And where should I add in references using .web.security;</p> <p><br> Thanks.</p> 2012-04-28T12:00:07-04:004956183http://forums.asp.net/p/1786178/4956183.aspx/1?Re+Assigning+new+users+to+a+roleRe: Assigning new users to a role <p>Do I have to create a new class for this?&nbsp;</p> <p>For the Roles.AddUserToRole(CreateUserWizard1.UserName,&quot;NewUser&quot;); method?</p> <p>And where should I add in references using .web.security;</p> <p></p> <p>btw, Im using visual web developer 2010</p> <p><br> Thanks.</p> 2012-04-28T12:00:09-04:00