Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > phpbb login from ASP

Reply
Thread Tools

phpbb login from ASP

 
 
nospam
Guest
Posts: n/a
 
      10-09-2007
Hello,

I need to login to phpbb Forum when user clicks a ASP:Login control.

I can do this by posting a form to phpbb/login.php with username and
password ( the user & password I know ).

My problem is that this has to be on an ASP page. I don't think you can
embed forms within other forms.

I am able to Response.Redirect("login.php?username=foo;passward =bar")
but the problem is that the URL with password shows up in the browser URL
window.

I tried also the PostbackUrl of a link button and that shows up as well.

Anyone know how to suppress the URL from showing in the window?

Anyone sync'd up several logins at once or have any ideas?

Thanks,
bruce


 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      10-09-2007
"nospam" <> wrote in message news:fLOOi.4753$44.2740@trnddc04...

> I don't think you can embed forms within other forms.


You certainly can, but only one form can be an ASP.NET server-side form
(i.e. with runat="server").

This is actually more common than you might imagine, especially in
e-commerce apps where you need to post to a payment gateway, e.g.

1) Go to http://www.inthecage.co.uk

2) Click Merch

3) Add a product to the cart

4) Click View cart

You'll see the HTML form inside the ASP.NET form


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
 
 
 
nospam
Guest
Posts: n/a
 
      10-09-2007
Mark,
Thanks for the info.

I tried to nest the phpbb login form within an ASP:form and received an error:

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Sounds like ASP 2.0 is making sure the post is valid. Not sure about these extra hoops - ClientScriptManager, etc. It seems reading up on that, the RegisterForEventValidation is used for Javascript.

Basically my forms in markup looklike :

<form id="form1" runat="server">

<div>

<form action="phpbb2/login.php" method="post" enctype="multipart/form-data">

<input type="hidden" name="username" value="bruce"><br />

<input type="hidden" name="password" value="bruce"><br />

<input type="submit" value="login" name="login">



</form>


</form>

When I click on the login button, I get the nasty error above.
I can run the form by itself and it runs ok.

Any help would be appreciated.

Regards,
bruce







"Mark Rae [MVP]" <> wrote in message news:%...
> "nospam" <> wrote in message news:fLOOi.4753$44.2740@trnddc04...
>
>> I don't think you can embed forms within other forms.

>
> You certainly can, but only one form can be an ASP.NET server-side form
> (i.e. with runat="server").
>
> This is actually more common than you might imagine, especially in
> e-commerce apps where you need to post to a payment gateway, e.g.
>
> 1) Go to http://www.inthecage.co.uk
>
> 2) Click Merch
>
> 3) Add a product to the cart
>
> 4) Click View cart
>
> You'll see the HTML form inside the ASP.NET form
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
>

 
Reply With Quote
 
nospam
Guest
Posts: n/a
 
      10-09-2007
Interesting. I put the Page directive EnableEventValidation=false at the top of that HTML page,
and it works. I guess this will do.

So the nested Forms do work. I guess I'm not sure conceptually what a server side form is.
Is it just a collection of server side controls?

Later,
bruce

"nospam" <> wrote in message newsEPOi.5801$j14.3477@trnddc06...
Mark,
Thanks for the info.

I tried to nest the phpbb login form within an ASP:form and received an error:

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Sounds like ASP 2.0 is making sure the post is valid. Not sure about these extra hoops - ClientScriptManager, etc. It seems reading up on that, the RegisterForEventValidation is used for Javascript.

Basically my forms in markup looklike :

<form id="form1" runat="server">

<div>

<form action="phpbb2/login.php" method="post" enctype="multipart/form-data">

<input type="hidden" name="username" value="bruce"><br />

<input type="hidden" name="password" value="bruce"><br />

<input type="submit" value="login" name="login">



</form>


</form>

When I click on the login button, I get the nasty error above.
I can run the form by itself and it runs ok.

Any help would be appreciated.

Regards,
bruce







"Mark Rae [MVP]" <> wrote in message news:%...
> "nospam" <> wrote in message news:fLOOi.4753$44.2740@trnddc04...
>
>> I don't think you can embed forms within other forms.

>
> You certainly can, but only one form can be an ASP.NET server-side form
> (i.e. with runat="server").
>
> This is actually more common than you might imagine, especially in
> e-commerce apps where you need to post to a payment gateway, e.g.
>
> 1) Go to http://www.inthecage.co.uk
>
> 2) Click Merch
>
> 3) Add a product to the cart
>
> 4) Click View cart
>
> You'll see the HTML form inside the ASP.NET form
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net
>

 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      10-09-2007
xhtml/html does not support nested forms. a page can have more than one
form, but they can not be nested.

-- bruce (sqlwork.com)

nospam wrote:
> Interesting. I put the Page directive EnableEventValidation=false at the
> top of that HTML page,
> and it works. I guess this will do.
>
> So the nested Forms do work. I guess I'm not sure conceptually what a
> server side form is.
> Is it just a collection of server side controls?
>
> Later,
> bruce
>
>
> "nospam" < <private.php?do=newpm&u=>> wrote in message
> newsEPOi.5801$j14.3477@trnddc06...
> Mark,
> Thanks for the info.
>
> I tried to nest the phpbb login form within an ASP:form and received
> an error:
>
> /Invalid postback or callback argument. Event validation is enabled
> using <pages enableEventValidation="true"/> in configuration or <%@
> Page EnableEventValidation="true" %> in a page. For security
> purposes, this feature verifies that arguments to postback or
> callback events originate from the server control that originally
> rendered them. If the data is valid and expected, use the
> ClientScriptManager.RegisterForEventValidation method in order to
> register the postback or callback data for validation./
>
> Sounds like ASP 2.0 is making sure the post is valid. Not sure
> about these extra hoops - ClientScriptManager, etc. It seems
> reading up on that, the RegisterForEventValidation is used for
> Javascript.
>
> Basically my forms in markup looklike :
>
>
> <form id="form1" runat="server">
>
> <div>
>
> <form action="phpbb2/login.php" method="post"
> enctype="multipart/form-data">
>
> <input type="hidden" name="username" value="bruce"><br />
>
> <input type="hidden" name="password" value="bruce"><br />
>
> <input type="submit" value="login" name="login">
>
> </form>
>
> </form>
>
> When I click on the login button, I get the nasty error above.
> I can run the form by itself and it runs ok.
>
> Any help would be appreciated.
>
> Regards,
> bruce
>
>
>
>
>
>
>
> "Mark Rae [MVP]" <
> <private.php?do=newpm&u=>> wrote in message
> news:%...
> > "nospam" < <private.php?do=newpm&u=>> wrote in message

> news:fLOOi.4753$44.2740@trnddc04...
> >
> >> I don't think you can embed forms within other forms.

> >
> > You certainly can, but only one form can be an ASP.NET

> server-side form
> > (i.e. with runat="server").
> >
> > This is actually more common than you might imagine, especially in
> > e-commerce apps where you need to post to a payment gateway, e.g.
> >
> > 1) Go to http://www.inthecage.co.uk
> >
> > 2) Click Merch
> >
> > 3) Add a product to the cart
> >
> > 4) Click View cart
> >
> > You'll see the HTML form inside the ASP.NET form
> >
> >
> > --
> > Mark Rae
> > ASP.NET MVP
> > http://www.markrae.net
> >

 
Reply With Quote
 
nospam
Guest
Posts: n/a
 
      10-09-2007
Bruce-
Thanks for clarifying
But I guess you can have an html Form embedded in a Asp:Form ( runat
server).

-bruce.

"bruce barker" <> wrote in message
news:%...
> xhtml/html does not support nested forms. a page can have more than one
> form, but they can not be nested.
>
> -- bruce (sqlwork.com)
>
> nospam wrote:
>> Interesting. I put the Page directive EnableEventValidation=false at the
>> top of that HTML page,
>> and it works. I guess this will do.
>> So the nested Forms do work. I guess I'm not sure conceptually what a
>> server side form is.
>> Is it just a collection of server side controls?
>> Later,
>> bruce
>> "nospam" < <private.php?do=newpm&u=>> wrote in message
>> newsEPOi.5801$j14.3477@trnddc06...
>> Mark,
>> Thanks for the info.
>> I tried to nest the phpbb login form within an ASP:form and received
>> an error:
>> /Invalid postback or callback argument. Event validation is enabled
>> using <pages enableEventValidation="true"/> in configuration or <%@
>> Page EnableEventValidation="true" %> in a page. For security
>> purposes, this feature verifies that arguments to postback or
>> callback events originate from the server control that originally
>> rendered them. If the data is valid and expected, use the
>> ClientScriptManager.RegisterForEventValidation method in order to
>> register the postback or callback data for validation./
>> Sounds like ASP 2.0 is making sure the post is valid. Not sure
>> about these extra hoops - ClientScriptManager, etc. It seems
>> reading up on that, the RegisterForEventValidation is used for
>> Javascript. Basically my forms in markup looklike :
>> <form id="form1" runat="server">
>>
>> <div>
>>
>> <form action="phpbb2/login.php" method="post"
>> enctype="multipart/form-data">
>>
>> <input type="hidden" name="username" value="bruce"><br />
>>
>> <input type="hidden" name="password" value="bruce"><br />
>>
>> <input type="submit" value="login" name="login">
>>
>> </form>
>>
>> </form>
>>
>> When I click on the login button, I get the nasty error above.
>> I can run the form by itself and it runs ok.
>> Any help would be appreciated.
>> Regards,
>> bruce
>> "Mark Rae [MVP]" <
>> <private.php?do=newpm&u=>> wrote in message
>> news:%...
>> > "nospam" < <private.php?do=newpm&u=>> wrote in message

>> news:fLOOi.4753$44.2740@trnddc04...
>> >
>> >> I don't think you can embed forms within other forms.
>> >
>> > You certainly can, but only one form can be an ASP.NET

>> server-side form
>> > (i.e. with runat="server").
>> >
>> > This is actually more common than you might imagine, especially in
>> > e-commerce apps where you need to post to a payment gateway, e.g.
>> >
>> > 1) Go to http://www.inthecage.co.uk
>> >
>> > 2) Click Merch
>> >
>> > 3) Add a product to the cart
>> >
>> > 4) Click View cart
>> >
>> > You'll see the HTML form inside the ASP.NET form
>> >
>> >
>> > --
>> > Mark Rae
>> > ASP.NET MVP
>> > http://www.markrae.net
>> >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
phpbb doesn't show up in firefox 1.5 jedihermit@jedihermit.com Firefox 0 01-16-2006 03:44 PM
phpbb doesn't show up in firefox1.5 jedihermit@jedihermit.com Firefox 0 01-16-2006 02:43 PM
phpBB Paul Watt HTML 19 01-06-2006 04:48 PM
PHPBB problem Paul Watt HTML 2 11-17-2005 02:45 PM
open source forum like phpbb j Java 1 11-20-2003 07:09 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57