FORM TAG Problem.  
Author Message
Chemical





PostPosted: Thu Jun 14 01:53:00 CDT 2007 Top

ASP.Net >> FORM TAG Problem.

I've got some problem on some form submit problem.

In a master page, there is a form tag with the "runat=server" attribute, and
a ID called "myForm".

In the contentPlaceHolder under that master page, I cannot create another
form tag with "runat=server" attribute as ASP.NET does not allow two FORM
Server tag in the same page.

The problem now is in the contentPlaceHolder, how to control the "submit"
property of the form tag in the master page.
Thank you.

Web Programming277  
 
 
shiva_sm





PostPosted: Thu Jun 14 01:53:00 CDT 2007 Top

ASP.Net >> FORM TAG Problem. Use the Master property of the page (returns a ref to the master page used by
the current page) and then FindControl on the MasterPage ref to find the form.

Hope this is what you are looking for.



> I've got some problem on some form submit problem.
>
> In a master page, there is a form tag with the "runat=server" attribute, and
> a ID called "myForm".
>
> In the contentPlaceHolder under that master page, I cannot create another
> form tag with "runat=server" attribute as ASP.NET does not allow two FORM
> Server tag in the same page.
>
> The problem now is in the contentPlaceHolder, how to control the "submit"
> property of the form tag in the master page.
> Thank you.
>
>
>
>
>
 
 
LamSoft





PostPosted: Thu Jun 14 02:05:22 CDT 2007 Top

ASP.Net >> FORM TAG Problem. Sorry , I don't understand

I try to use FindControl to find the form, but ... how to write
(Form)Page.FindControl("myForm").onSubmit="abc" gives me no success, the VS
underlined the (Form) and (onsubmit)




> Use the Master property of the page (returns a ref to the master page used
> by
> the current page) and then FindControl on the MasterPage ref to find the
> form.
>
> Hope this is what you are looking for.
>

>
>> I've got some problem on some form submit problem.
>>
>> In a master page, there is a form tag with the "runat=server" attribute,
>> and
>> a ID called "myForm".
>>
>> In the contentPlaceHolder under that master page, I cannot create another
>> form tag with "runat=server" attribute as ASP.NET does not allow two FORM
>> Server tag in the same page.
>>
>> The problem now is in the contentPlaceHolder, how to control the "submit"
>> property of the form tag in the master page.
>> Thank you.
>>
>>
>>
>>
>>


 
 
shiva_sm





PostPosted: Thu Jun 14 02:17:02 CDT 2007 Top

ASP.Net >> FORM TAG Problem. Try the following code in the Page_Load event of the .aspx page which uses a
master page:

MasterPage mp = this.Master;
HtmlForm form = mp.FindControl ("myForm");
form.Attributes.Add ("onSubmit", "abc();");



> Sorry , I don't understand
>
> I try to use FindControl to find the form, but ... how to write
> (Form)Page.FindControl("myForm").onSubmit="abc" gives me no success, the VS
> underlined the (Form) and (onsubmit)
>
>


> > Use the Master property of the page (returns a ref to the master page used
> > by
> > the current page) and then FindControl on the MasterPage ref to find the
> > form.
> >
> > Hope this is what you are looking for.
> >

> >
> >> I've got some problem on some form submit problem.
> >>
> >> In a master page, there is a form tag with the "runat=server" attribute,
> >> and
> >> a ID called "myForm".
> >>
> >> In the contentPlaceHolder under that master page, I cannot create another
> >> form tag with "runat=server" attribute as ASP.NET does not allow two FORM
> >> Server tag in the same page.
> >>
> >> The problem now is in the contentPlaceHolder, how to control the "submit"
> >> property of the form tag in the master page.
> >> Thank you.
> >>
> >>
> >>
> >>
> >>
>
>
>
 
 
LamSoft





PostPosted: Thu Jun 14 02:31:16 CDT 2007 Top

ASP.Net >> FORM TAG Problem. Thank you very much.


> Try the following code in the Page_Load event of the .aspx page which uses
> a
> master page:
>
> MasterPage mp = this.Master;
> HtmlForm form = mp.FindControl ("myForm");
> form.Attributes.Add ("onSubmit", "abc();");
>

>
>> Sorry , I don't understand
>>
>> I try to use FindControl to find the form, but ... how to write
>> (Form)Page.FindControl("myForm").onSubmit="abc" gives me no success, the
>> VS
>> underlined the (Form) and (onsubmit)
>>
>>


>> > Use the Master property of the page (returns a ref to the master page
>> > used
>> > by
>> > the current page) and then FindControl on the MasterPage ref to find
>> > the
>> > form.
>> >
>> > Hope this is what you are looking for.
>> >

>> >
>> >> I've got some problem on some form submit problem.
>> >>
>> >> In a master page, there is a form tag with the "runat=server"
>> >> attribute,
>> >> and
>> >> a ID called "myForm".
>> >>
>> >> In the contentPlaceHolder under that master page, I cannot create
>> >> another
>> >> form tag with "runat=server" attribute as ASP.NET does not allow two
>> >> FORM
>> >> Server tag in the same page.
>> >>
>> >> The problem now is in the contentPlaceHolder, how to control the
>> >> "submit"
>> >> property of the form tag in the master page.
>> >> Thank you.
>> >>
>> >>
>> >>
>> >>
>> >>
>>
>>
>>


 
 
bruce





PostPosted: Thu Jun 14 10:29:40 CDT 2007 Top

ASP.Net >> FORM TAG Problem. use ClientScript.RegisterOnSubmitStatement

-- bruce (sqlwork.com)



> I've got some problem on some form submit problem.
>
> In a master page, there is a form tag with the "runat=server" attribute, and
> a ID called "myForm".
>
> In the contentPlaceHolder under that master page, I cannot create another
> form tag with "runat=server" attribute as ASP.NET does not allow two FORM
> Server tag in the same page.
>
> The problem now is in the contentPlaceHolder, how to control the "submit"
> property of the form tag in the master page.
> Thank you.
>
>
>
>