Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split form tags over separate user controls

Status
Not open for further replies.

HellTel

Programmer
Oct 28, 2002
343
GB
Hi
OK, so can it be done?
To put it simply, let's say I have a header user control and a footer user control.
When I create a new webform, I want to drag these controls on and then type my content in between.
But if I put the <form runat=&quot;server&quot;> tag in the header control and the </form> tag in the footer control, it breaks when I browse (it builds OK).
The actual error is &quot;unexpected end of file looking for </form> tag&quot;.

Any help would be much appreciated.

Cheers
Terry

Hope I helped / Thanks for helping
if ((Math.abs(x)<10&&Math.abs(y)<10) && (((parseInt(Math.abs(x).toString()+Math.abs(y).toString())-Math.abs(x)-Math.abs(y))%9)!=0)) {alert(&quot;I'm a monkey's uncle&quot;);}
 
Hi Terry,

A
Code:
UserControl
is -like its name says- a control, just like all other webcontrols. Therefore, it should be contained in a
Code:
form
with
Code:
runat=&quot;server&quot;
. The
Code:
form
itself should be declared on a page. I don't know about other options to include files like in classic ASP however.

regards,
Blaxo
 
OK, like I figured then unfortunately.
Although on other projects, I do have the header and footer user controls, but the form tags are on the content page (so the user controls are outside the form tags) and that works OK. It's just the splitting of the tags that seems to be the problem.
Anyway, I think I'll create a user-defined template to create a new web form with everything on there. Trickier, but I have managed to get it to work.

Thanks for your reply.
Terry

Hope I helped / Thanks for helping
if ((Math.abs(x)<10&&Math.abs(y)<10) && (((parseInt(Math.abs(x).toString()+Math.abs(y).toString())-Math.abs(x)-Math.abs(y))%9)!=0)) {alert(&quot;I'm a monkey's uncle&quot;);}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top