Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Any way to include an HTML form with server-side controls?

Reply
Thread Tools

Any way to include an HTML form with server-side controls?

 
 
Paul
Guest
Posts: n/a
 
      09-05-2006
Hi all,

I have a page with a mutli view control where one of the views needs to
contain a separate HTML get form with a submit button that goes to
another page. In ASP this was no problem - there was no container form
and it just went to the target page. In ASP .NET however, there is a
container form and having an embedded form breaks the page. Adding
another server-side form just gets the "A page can have only one
server-side Form tag" runtime error.

I need to have some server-side logic in the HTML form to determine
whether it is displayed or not. I can use the same form and catch the
server-side Click event for the other button, but that relies on
javascript to wire up a default button for the main form.

How can I achive this in .NET *without using javascript*?

Thanks,

Paul

 
Reply With Quote
 
 
 
 
Laurent Bugnion
Guest
Posts: n/a
 
      09-05-2006
Hi,

Paul wrote:
> Hi all,
>
> I have a page with a mutli view control where one of the views needs to
> contain a separate HTML get form with a submit button that goes to
> another page. In ASP this was no problem - there was no container form
> and it just went to the target page. In ASP .NET however, there is a
> container form and having an embedded form breaks the page. Adding
> another server-side form just gets the "A page can have only one
> server-side Form tag" runtime error.
>
> I need to have some server-side logic in the HTML form to determine
> whether it is displayed or not. I can use the same form and catch the
> server-side Click event for the other button, but that relies on
> javascript to wire up a default button for the main form.
>
> How can I achive this in .NET *without using javascript*?
>
> Thanks,
>
> Paul


The "one form" limitation is a real PITA.

Does it absolutely have to be a button? Changing a button's default
action without using any JavaScript is AFAICS impossible...

If you can use a hyperlink instead, then it's easy to make a GET

http://www,domain.com/page.aspx?para...&param2=value2

Why can't you use any JavaScript at all?

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      09-05-2006
Hi Laurent,

I have a general UI preference of using buttons for attracting a user's
attention. I want to avoid javascript so that I know it will work for
everyone.

Is a link the only other non-javascript alternative?

Thanks,

Paul

Laurent Bugnion wrote:
> Hi,
>
> Paul wrote:
> > Hi all,
> >
> > I have a page with a mutli view control where one of the views needs to
> > contain a separate HTML get form with a submit button that goes to
> > another page. In ASP this was no problem - there was no container form
> > and it just went to the target page. In ASP .NET however, there is a
> > container form and having an embedded form breaks the page. Adding
> > another server-side form just gets the "A page can have only one
> > server-side Form tag" runtime error.
> >
> > I need to have some server-side logic in the HTML form to determine
> > whether it is displayed or not. I can use the same form and catch the
> > server-side Click event for the other button, but that relies on
> > javascript to wire up a default button for the main form.
> >
> > How can I achive this in .NET *without using javascript*?
> >
> > Thanks,
> >
> > Paul

>
> The "one form" limitation is a real PITA.
>
> Does it absolutely have to be a button? Changing a button's default
> action without using any JavaScript is AFAICS impossible...
>
> If you can use a hyperlink instead, then it's easy to make a GET
>
> http://www,domain.com/page.aspx?para...&param2=value2
>
> Why can't you use any JavaScript at all?
>
> HTH,
> Laurent
> --
> Laurent Bugnion, GalaSoft
> Software engineering: http://www.galasoft-LB.ch
> Private/Malaysia: http://mypage.bluewin.ch/lbugnion
> Support children in Calcutta: http://www.calcutta-espoir.ch


 
Reply With Quote
 
Bart Van Hemelen
Guest
Posts: n/a
 
      09-05-2006

Paul wrote:
> I have a general UI preference of using buttons for attracting a user's
> attention. I want to avoid javascript so that I know it will work for
> everyone.


You could use CSS to make the link look like a button, or use an image
instead of text for the link.

--
BVH

 
Reply With Quote
 
Laurent Bugnion
Guest
Posts: n/a
 
      09-05-2006
Hi,

Paul wrote:
> Hi Laurent,
>
> I have a general UI preference of using buttons for attracting a user's
> attention. I want to avoid javascript so that I know it will work for
> everyone.
>
> Is a link the only other non-javascript alternative?
>
> Thanks,
>
> Paul
>
> Laurent Bugnion wrote:


In that case I recommend using Bart's proposed solution (an image
looking like a button). A strictly no-JavaScript solution will only be
able to submit the form using the target defined in the "action" attribute.

Non-JavaScript enabled solutions must rely on the most basic HTTP
mechanisms only, and they are very primitive. ASP.NET (with the "one
form" restriction) made it even more restrictive, unfortunately.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
 
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
/* #include <someyhing.h> */ => include it or do not include it?That is the question .... Andreas Bogenberger C Programming 3 02-22-2008 10:53 AM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Any way to include an HTML form with server-side controls? paul.hester@gmail.com ASP .Net Web Controls 0 09-05-2006 06:20 AM
Any way to include an HTML form with server-side controls? paul.hester@gmail.com ASP .Net Building Controls 0 09-05-2006 06:19 AM
is there a way to "include" source file B.html in source file A.html? Cloud Burst HTML 11 01-09-2004 02:49 AM



Advertisments