Here you go, looks wrong though, the line:
If True Then
will always evaluate as true, that your are saying here is:
if true = true then
which leaves the else block a pointless exercise because its
always going to
be true
<script language="VB" runat=server>
Protected Sub Page_Load(ByVal Src As Object, ByVal E As
EventArgs)
If Page.IsPostBack Then
' authenticate user
' NOTE: how this check is done and a discussion of what
happens
is discussed in the
' next two sections: Authenticate the login credentials and
' Create the FormsAuthenticationTicket (with
RedirectFromLoginPage).
If True Then
FormsAuthentication.RedirectFromLoginPage(emailaddr.Value,
False)
Else
Msg.Text = "Invalid Credentials: Please try again"
End If
End If
End Sub
</script>
--
Kevin Marshall
WebXeL.com Ltd
http://www.webxel.com
ASP.NET Dreamweaver Extensions
http://www.webxel-dw.co.uk
"ricky0110" <webforumsuser@macromedia.com> wrote in
message
news:e6ron9$6u9$1@forums.macromedia.com...
> Hi,
>
> Trying to do the tutorial but have no idea of C#. I have
tried running the
> code through a convertor but keep getting errors. Can
anyone convert this
> from
> C# to VB
>
> <script language="C#" runat=server>
> protected void Page_Load(Object Src, EventArgs E)
> {
> if (IsPostBack)
> {
> // authenticate user
> // NOTE: how this check is done and a discussion of what
happens is
> discussed in the
> // next two sections: Authenticate the login credentials
and
> // Create the FormsAuthenticationTicket (with
> RedirectFromLoginPage).
> if (true)
> {
>
FormsAuthentication.RedirectFromLoginPage(emailaddr.Value,
> false);
> }
> else
> {
> Msg.Text = "Invalid Credentials: Please try again";
> }
> }
> }
> </script>
>
>
> Many Thanks
>