Tutorial Adobe help please?

Hello

Trying to make the tutorial, but have no idea of c#. I tried the code running through a converter but get errors. Anyone can convert this from c# to VB

< script runat = "server" >
Protected Sub Page_Load (ByVal Src, EventArgs E)
{
Don't cache this page.
Response.Expires = - 1;
Response.AddHeader ("Pragma", "no-cache");
Response.AddHeader ("cache-control", "no-store");

If (IsPostBack)
{
Check the user credentials in the page
If ((emailaddr. Value == DS_uidAndPwd.FieldValue ("emailaddr", null)) & & (password. Value is DS_uidAndPwd.FieldValue ("password", null)))
{
The user has been authenticated.
// 1. Create the authentication ticket.
// 2. Redirect to the appropriate page.

// 1. Create the authentication ticket.
Create and use forms authentication ticket.
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket (1,
"" 'Request.Form ["emailaddr'],
DateTime.Now, / / time question
DateTime.Now.AddMinutes (30), / / expires in 30 minutes
false, / / not persistent
'Member'); role assignment is stored in the UserData

Create a new HttpCookie (encrypted) using the ticket comes to create
and name it accordingly to the value specified in the < forms > element
in the web.config file.
HttpCookie cookie = new HttpCookie (FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt (ticket));

Add the cookie to the outgoing response.
Response.Cookies.Add (cookie);

Redirect as appropriate.
ReturnUrl chain;
If (Request.QueryString ["ReturnURL"] is nothing)
{
returnUrl = "/ members/index.aspx.
}
on the other
{
returnUrl = Request.QueryString ["ReturnURL"];
}
Response.Redirect (returnUrl);

}
on the other
{
Msg.Text = "Invalid Credentials: Please try again ';
}
}
}
< /script >

Thank you very much

Here you go, looks like bad however, the line:

If it is true, then

always evaluate as true, are you saying that this is:

If true = true then

that leaves the else block a pointless exercise because its not always going to
be true

--
Kevin Marshall
WebXeL.com Ltd
http://www.webxel.com

ASP.NET Dreamweaver extensions
http://www.webxel-DW.co.UK

"ricky0110" wrote in message
News:e6ron9$6u9$1@forums. Macromedia.com...
> Hi,.
>
> Trying to make the tutorial, but have no idea of c#. I tried to run the
> code via a converter but get errors. Can someone convert this
> of
> C# VB.
>
>
>
>
> Thank you
>

Tags: Dreamweaver

Similar Questions

Maybe you are looking for