Hello all,
i want to put 'Cash transaction' in our web site. i want to work with credit
cards in our web site and i don't know where i can start, please guid me
thanks
>From: "Inge" <Inge.Schepers@n...>
>Reply-To: "ASP_Professional" <aspx_professional@p...>
>To: "ASP_Professional" <aspx_professional@p...>
>Subject: [aspx_professional] CookieAuthentication using CodeBehind
>possible?
>Date: Mon, 19 Mar 2001 09:03:53
>
>Hi everyone,
>
>Yesterday I tried the CookieAuthentication sample from the Wrox ASP+ book,
>and it worked fine. I then tried the same sample with asp controls
>instead of "plain" html controls, and it still worked. My code looked
>like this:
>
><% @Language="C#" Debug=True %>
>
><script language="C#" runat="server">
>void btnLogin_Click(Object sender, EventArgs e)
>{
> if(CookieAuthentication.Authenticate(txtUsername.Text,
>txtPassword.Text))
> {
> CookieAuthentication.RedirectFromLoginPage(txtUsername.Text, true);
> }
> else
> {
> lblStatus.Text = "Invalid Login";
> }
>}
></script>
>
><html>
><head>
><title>World Of WildLife Photos - Login</title>
></head>
><body>
><form method="post" runat="server">
><table
> <tr>
> <td>
> Username:
> </td>
> <td>
> <asp:TextBox id="txtUsername" name="txtUsername" runat="server"
>/>
> </td>
> </tr>
> <tr>
> <td>
> Password:
> </td>
> <td>
> <asp:TextBox id="txtPassword" name="txtPassword"
>TextBoxMode="Password" runat="server" />
> </td>
> </tr>
> <tr>
> <td colspan="2">
> <asp:Button id="btnLogin" name="btnLogin" Text="Login"
>OnClick="btnLogin_Click" runat="server" />
> </td>
> </tr>
> <tr>
> <td colspan="2">
> <asp:Label id="lblStatus" name="lblStatus" runat="server" />
> </td>
> </tr>
></table>
></form>
></body>
></html>
>
>Then, I wanted to see if I could do the same thing in a CodeBehind. I
>doubleclicked my button and Visual Studio.NET generated the click even
>handler for me. I added the code in the btnLogin_Click method above to
>the event handler for the button in the CodeBehind but, when I tried to
>debug it, it seemed like the debugger never even entered the event
>handler. I did notice that the event handler created by Visual Studio.NET
>was for the Button.Click event, maybe this should be OnClick? That might
>explain why it seemed like the debugger never even entered the event
>handler method.
>
>Could this be a bugin Visual Studio/ASP.NET, or am I trying to do
>something in a CodeBehind that can only be done directly in the ASP page?
>I assumed that, since the <script> in the page runs server side, I should
>be able to do it in a CodeBehind as well, but it didn't work. I am not
>sure if it is the event handler that is not working, or if I just can't
>access the CookieAuthentication information from the CodeBehind.
>
>Inge
>
>
>---
>http://www.asptoday.com - the leading site for timely,
>in-depth information for ASP developers everywhere.
>$subst('Email.Unsub')
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.