Solved

Unexpected end of file looking for </asp:Content> tag.

Posted on 2011-02-18
7
4,812 Views
Last Modified: 2016-10-03
I've modified an editform.aspx form in SharePoint Designer. I modified the dispform.aspx which works perfectly but the Edit form throws up this error:
An error occurred during the processing of /ess/Lists/Team Member Service Form/EditForm_copy(1).aspx. Unexpected end of file looking for </asp:Content> tag.
What I modified was highlighting 5 fields with a yellow background, deleting a row and adding a new one.

When I go back into designer, it points to this section:
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
      <SharePoint:ListFormPageTitle runat="server"/>
</asp:Content>


What can I be doing wrong here?
editformcopy.txt
0
Comment
Question by:mylogo
  • 5
7 Comments
 
LVL 5

Expert Comment

by:navdeepmadan
Comment Utility
1) Remove the ZoneTemplate and webpartzone closing tag after the PlaceHolderBodyRightMargin

<asp:Content ContentPlaceHolderId="PlaceHolderBodyRightMargin" runat="server">
<div class='ms-areaseparatorright'><IMG SRC="/_layouts/images/blank.gif" width=8 height=100% alt=""></div>
</asp:Content>
</ZoneTemplate></WebPartPages:WebPartZone></asp:Content>

2) Zone template should come inside the web part zone

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
<table cellpadding=0 cellspacing=0 id="onetIDListForm">
 <tr>
  <td>
 <WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main">
      </WebPartPages:webpartzone><ZoneTemplate>
0
 

Author Comment

by:mylogo
Comment Utility
I'm sorry. It's now pulling up the form but giving me a web part error. I think i put it in the wrong place. Does part (2) replace part (1), which is at the end of the code? or at the beginning of the code?
0
 

Author Comment

by:mylogo
Comment Utility
Please disregard this last post.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:mylogo
Comment Utility
Ok, I modified my editform.aspx page with highlighting the few fields i needed to. Works perfectly. The problem i was having was with a text field i was trying to add in designer. I added a merged row to display this text: "Information below should only be entered if changes to Department, Job Title, ..."

This row is what causes my problem with the closing tag. Should i be adding this text a different way? I don't want a field. I only want the text to display in order to separate these fields from the others. Works perfectly on the DispForm.aspx page.
0
 

Accepted Solution

by:
mylogo earned 0 total points
Comment Utility
I've created a workaround on the edit form by adding a text field. The Display form field I added a row then entered the text. When I tried to do the same in the Edit form, I kept getting the error about the closing ZoneTemplate tag.

I have to believe the workaround is not ideal but adding the row is my downfall on the Edit form.

Is there a fix or do i have to deal with the workaround and the 2 different views?
DispForm.aspx
EditForm.aspx
0
 

Author Closing Comment

by:mylogo
Comment Utility
Workaround works and unfortunately, no more time available to work on this one piece.
0
 

Expert Comment

by:Chris Cordner
Comment Utility
Hi

I had a similar problem with a form I was trying to edit, but I have no idea what I have missed. Can anybody help me with this one?

I was playing about with it because I wanted to add a row for the field 'Requested By'. That came up with these errors, so I deleted the row that I had added, thinking that would cure it (albeit without adding the field) but the problem still occurred when I'd done that!

Any help or guidance would be appreciated.

Thanks
Chris
NewFormCopy.aspx
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now