I am using DotNetOpenAuth-3.3.0.9302 nightly build, I have run into a problem where it seems that if openidajaxtextbox is placed in a update panel it blocks autopostback events from firing. so i did a simple sample to illustrate the problem.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
<%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.RelyingParty"
TagPrefix="openid" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<openid:openidajaxtextbox id="OpnIdAjxTxtB" runat="server" onloggingin="OpnIdAjxTxtB_LoggingIn"
onloggedin="OpnIdAjxTxtB_LoggedIn" onclientassertionreceived="onauthenticated(sender)"
onunconfirmedpositiveassertion="OpnIdAjxTxtB_UnconfirmedPositiveAssertion"
identifierrequiredmessage="Vänligen kontrollera OpenID innan du fortsätter."
logoninprogressmessage="Vänligen vänta tills OpenID inloggningen har slutförts."
logontext="LOGGA IN" logontooltip="Klicka här för att logga in med ett popup-fönster."
retrytext="FÖRSÖK IGEN" retrytooltip="Försök igen att hitta en misslyckad identifierare."
authenticationfailedtooltip="Verfifieringen misslyckades" authenticatedastooltip="Verfierad som {0}."
authenticationsucceededtooltip="Verfierad av {0}." busytooltip="Verfiferar"
autopostback="True" CssClass="M_TxtB" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<br />
<asp:Label ID="Label1" runat="server" Text="1"></asp:Label>
<br />
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" Text="test" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
Imports DotNetOpenAuth.OpenId.Extensions.SimpleRegistration
Imports DotNetOpenAuth.OpenId.RelyingParty
Partial Class test
Inherits System.Web.UI.Page
Protected Sub OpnIdAjxTxtB_LoggedIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs)
If OpnIdAjxTxtB.AuthenticationResponse.Status = AuthenticationStatus.Authenticated Then
' do something
End If
End Sub
Private _runOnes As Nullable(Of Boolean)
Protected Sub OpnIdAjxTxtB_LoggingIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs)
' Retrieve the email address of the user
If Not _runOnes.HasValue Then
Dim c As New ClaimsRequest
c.Email = DemandLevel.Require
e.Request.AddExtension(c)
_runOnes = True
End If
End Sub
Protected Sub OpnIdAjxTxtB_UnconfirmedPositiveAssertion(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs)
' This is where we register extensions that we want to have available in javascript
' on the browser.
OpnIdAjxTxtB.RegisterClientScriptExtension(Of ClaimsResponse)("sreg")
End Sub
Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
Label1.Text = Label1.Text + 1
End Sub
End Class
this code just increments the number in the label. so by placing the openidajaxtextbox inside the updatepanel I am able to increment the label number just ones all other events seem not to be fired. but if the openidajaxtextbox is placed outside the updatepanel the code works as expected.
what is going on here Andrew? what am I missing :)