Click here to Skip to main content
15,890,690 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: regex replace with double quote [EDIT] fixed my regex Pin
jkirkerx9-Oct-14 8:05
professionaljkirkerx9-Oct-14 8:05 
QuestionGreybox popup not show properly after postback Pin
Member 98439577-Oct-14 19:35
Member 98439577-Oct-14 19:35 
QuestionPiro box add two iframe after asynchronous postback. Pin
Member 98439576-Oct-14 21:00
Member 98439576-Oct-14 21:00 
QuestionGray box not working after Asynchronus postback Pin
Member 98439576-Oct-14 20:54
Member 98439576-Oct-14 20:54 
QuestionButton click not trigger second time in jquery Modal popup Pin
dineshkanagaraj6-Oct-14 3:31
dineshkanagaraj6-Oct-14 3:31 
AnswerRe: Button click not trigger second time in jquery Modal popup Pin
jkirkerx6-Oct-14 11:46
professionaljkirkerx6-Oct-14 11:46 
QuestionWant to send message to only connected client SignalR Pin
Tridip Bhattacharjee5-Oct-14 21:05
professionalTridip Bhattacharjee5-Oct-14 21:05 
QuestionLog-in form question Pin
Member 87616674-Oct-14 8:46
Member 87616674-Oct-14 8:46 
Imports Microsoft.AspNet.Identity
Imports Microsoft.AspNet.Identity.EntityFramework
Imports Microsoft.AspNet.Identity.Owin
Imports System.Linq
Imports System.Web
Imports System.Web.UI
Imports Microsoft.Owin.Security

Partial Public Class Account_Login
    Inherits Page
    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        RegisterHyperLink.NavigateUrl = "Register"
        OpenAuthLogin.ReturnUrl = Request.QueryString("ReturnUrl")
        Dim returnUrl = HttpUtility.UrlEncode(Request.QueryString("ReturnUrl"))
        If Not [String].IsNullOrEmpty(returnUrl) Then
            RegisterHyperLink.NavigateUrl += "?ReturnUrl=" & returnUrl
        End If
    End Sub

     Protected Sub LogIn(sender As Object, e As EventArgs) Handles btnLogin.Click

    If IsValid Then ' Validate the user password             

        Dim manager = New UserManager()

        Dim user As ApplicationUser = manager.Find(username.Text, password.Text)

        Try

            If user IsNot Nothing Then

                IdentityHelper.SignIn(manager, user, RememberMe.Checked)

                IdentityHelper.RedirectToReturnUrl(Request.QueryString("ReturnUrl"), Response)

            End If

        Catch ex As Exception

            FailureText.Text = ex.Message

            ErrorMessage.Visible = True

        End Try

    End If

End Sub

End Class


No error message is generated but when I complete the log-in form nothing happens after I press the Submit button.

When the user logs in and his credentials are validated against the database, the form should ideally disappear and
the user is sent to a Classic ASP Web site already on the WWW. That is, that particular Web site is not part of this small ASP.NET project whose pages will be 'sellotaped' onto that Classsic ASP site. (Eventually, I may try to do that site in ASP.NET but it would be too ambitious for me to try it now.)

How would I code that in my Login.aspx.vb file, or add to the script above, because in the script above there is no reference to a URL path as in 'when you click
on the Go/Submit button, make this log-in form disappear, and take me to www.mysite.com'?

Thanks for reading.
AnswerRe: Log-in form question Pin
jkirkerx7-Oct-14 7:30
professionaljkirkerx7-Oct-14 7:30 
GeneralRe: Log-in form question Pin
Member 87616677-Oct-14 9:17
Member 87616677-Oct-14 9:17 
GeneralRe: Log-in form question Pin
jkirkerx7-Oct-14 9:50
professionaljkirkerx7-Oct-14 9:50 
GeneralRe: Log-in form question Pin
Member 87616677-Oct-14 10:38
Member 87616677-Oct-14 10:38 
GeneralRe: Log-in form question Pin
jkirkerx7-Oct-14 10:56
professionaljkirkerx7-Oct-14 10:56 
GeneralRe: Log-in form question Pin
Member 87616677-Oct-14 11:37
Member 87616677-Oct-14 11:37 
GeneralRe: Log-in form question Pin
jkirkerx7-Oct-14 11:56
professionaljkirkerx7-Oct-14 11:56 
GeneralRe: Log-in form question Pin
Member 87616677-Oct-14 12:04
Member 87616677-Oct-14 12:04 
QuestionHow can i Post Radio Button List with Dynamic names to controller Pin
Mujtaba 103885433-Oct-14 18:24
professionalMujtaba 103885433-Oct-14 18:24 
QuestionHow to find in useful/unnecessary files from website folder ??? Pin
Abhishek kumar1213-Oct-14 6:07
Abhishek kumar1213-Oct-14 6:07 
AnswerRe: How to find in useful/unnecessary files from website folder ??? Pin
ZurdoDev3-Oct-14 6:53
professionalZurdoDev3-Oct-14 6:53 
AnswerRe: How to find in useful/unnecessary files from website folder ??? Pin
jkirkerx3-Oct-14 11:21
professionaljkirkerx3-Oct-14 11:21 
Questionwhy onblur Event Dosent Work For Div Element ??????????? Pin
mhd.sbt3-Oct-14 6:03
mhd.sbt3-Oct-14 6:03 
AnswerRe: why onblur Event Dosent Work For Div Element ??????????? Pin
Richard Deeming3-Oct-14 6:31
mveRichard Deeming3-Oct-14 6:31 
GeneralRe: why onblur Event Dosent Work For Div Element ??????????? Pin
mhd.sbt5-Oct-14 10:59
mhd.sbt5-Oct-14 10:59 
GeneralRe: why onblur Event Dosent Work For Div Element ??????????? Pin
Praneet Nadkar5-Oct-14 19:52
Praneet Nadkar5-Oct-14 19:52 
QuestionI am stuck on this error now for two days - value cannot be null: Parameter name: reportParameters Pin
samflex3-Oct-14 2:58
samflex3-Oct-14 2:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.