Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > ASP:Login inside a Web User COntrol?

Reply
Thread Tools

ASP:Login inside a Web User COntrol?

 
 
musosdev
Guest
Posts: n/a
 
      08-19-2009
Hi guys

I have a nice login box all setup that I need to use on multiple pages of my
website. Seems simple enough... I drop the asp:Login onto the WUC and add
that to the pages that I need, right?

Well, I'm getting an error...

System.Web.HttpParseException:
c:\Code\SVN\Musoswire\Website\_webctrl\MusoswireLo gin.ascx(3): error CS1061:
'ASP._webctrl_musoswirelogin_ascx' does not contain a definition for
'RedirectOnLogin' and no extension method 'RedirectOnLogin' accepting a first
argument of type

What do I need to do to enable this?

Basically, all I want is to encapsulate my login control, so I don't have to
change all the settings in multiple locations.

Here's my asp:Login...

<asp:Login ID="loginForm"
MembershipProvider="NHMembershipProvider"
UserNameLabelText="Username/Email: "

LabelStyle-CssClass ="login"
UserNameRequiredErrorMessage="Please enter a username"
PasswordLabelText="Password: "
PasswordRequiredErrorMessage="Please enter a password"
InstructionText="Your Musoswire Account..."
DisplayRememberMe="false"

TitleText=""
runat="server"
LoginButtonStyle-CssClass="button"
OnLoggedIn="RedirectOnLogin" Width="100"
/>

Thanks for any help you can provide!


Dan
 
Reply With Quote
 
 
 
 
Ed Murphy
Guest
Posts: n/a
 
      08-19-2009
musosdev wrote:

> I have a nice login box all setup that I need to use on multiple pages of my
> website. Seems simple enough... I drop the asp:Login onto the WUC and add
> that to the pages that I need, right?
>
> Well, I'm getting an error...


Would it be more or less work to move it into a master page?
 
Reply With Quote
 
 
 
 
musosdev
Guest
Posts: n/a
 
      08-19-2009
Thanks for the reply Ed.

It would be more difficult I think, cos I only want it on certain pages. The
good news is I sorted it! There was some codebehind I'd missed while copying
- whoops!

Once I got that, I had to change User.Identity references to
System.Web.HttpContext.Current.User.Identity and all seems to be working!



"Ed Murphy" wrote:

> musosdev wrote:
>
> > I have a nice login box all setup that I need to use on multiple pages of my
> > website. Seems simple enough... I drop the asp:Login onto the WUC and add
> > that to the pages that I need, right?
> >
> > Well, I'm getting an error...

>
> Would it be more or less work to move it into a master page?
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing USER CONTROL which is inside Masterpagethrough Another USER Control inside normal page. Kiran More ASP .Net Web Controls 2 11-14-2006 12:58 PM
Custom User Control is not rendered inside another user control in a server table. Leeor Chernov ASP .Net 2 10-16-2005 08:35 AM
Web User Control with GridView can derive new Web User Control? ABC ASP .Net 1 10-04-2005 12:29 PM
child controls inside a user control inside a datalist Roman ASP .Net Web Controls 2 01-04-2005 07:07 AM
Event not firing for user control inside user control vatech1993 ASP .Net 4 12-11-2004 02:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57