.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Customized form not working with attachment

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :SharePoint
I created a customized edit form using the "Custom List Form" in SharePoint Designer.  Now the attach file button no longer works.  I am getting "This form was customized not working with attachment."  Has anyone found a workaround for this?

View Complete Post

More Related Resource Links

Attachment upload error on browser based InfoPath form



I am having an interesting problem with browser based InfoPath forms in SharePoint 2007.  For some reason the file attachment control is not working any more.  It was working fine in July, but now it will not allow file attachments over a few kb.  I tried a 34KB file and I get the error below, a 2KB file works fine.

Unable to connect to SQL Server session database. The connection string (server='SPDB', database='SharedServices1_DB') was returned by an instance of the IPartitionResolver type 'Microsoft.Office.Server.Administration.SqlSessionStateResolver, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.   at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
   at System.Web.SessionState.SqlSessionStateStore.HandleInsertException(SqlConnection conn, Exception e, Boolean newItem, String id)
   at System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem)
   at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
   at System.Web.HttpApplication.SyncEven

Automatically populating Contact Selector not working in Form Services

Hi,I'm currently working on a form where i wan't to automatically populate a contact selector control with a users manager. I've got the managers userid, called the ResolvePrincipal webservice provided by sharpoint, and set all the values in the contact selector with the correct values. When previewing it works perfectly however when i move the form to Form Services it won't work.I've tried setting it via rules: i.e. on the change of a textbox write the manager values to the contact selector.I've tried setting the default values of the contact selector to fields where i write the manager values.I've tried setting it through code i.e. SelectSingleNode() and SetValue() for each of the fields in the contact selector.All of which work fine in preview mode but will not work in Form Services, UNLESS the contact selector already has a user in it. So if the contact selector is blank it won't work, however as soon as i manually select a user then try using any of the previously mentioned methods of setting the control it works. While using code i get a nullreferenceexception which leads me to think that possibly when theres no user in the control the xml nodes representing the AccountId, DisplayName, AccountType don't exit???? TO throw another spanner in the works, on the very odd occasion it will work in Form Services as expected, after celebrating and trying again it returns

Binding list to form not working with '&' character in list field data

Hi, I have a SharePoint list with a field called Title. I have a form based on this list with the field bound to the form as a label (for workflow to access). Here is the code for the form field. <asp:Label runat="server" id="ff2{$Pos}" text="{@Title}" __designer:bind="{ddwrt:DataBind('u',concat('ff2',$Pos),'Text','','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}" /> I have a workflow that runs through a form action button which take ff2 (title) and  does other stuff. The problem I have is with records where the value of 'title' contains the '&' character (example ab&cd). Blank is pulled in by the workflow when I get the value of ff2. I am guessing it has to do with the data binding and/or escape (special) characters coming through but I don't know how to fix it. Any help will be greatly appreciated

Validation is not working in Custom List Form using JavaScript ddwrt:GenFireServerEvent()

Hii am creating custom New form for a list using sharepoint designer. i have added the below button for sumbit<input name="Submit1" type="submit" value="Submit" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={http://myserver/Lists/VTest/AllItems.aspx}')}" />                <xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&amp;nbsp;                                    </xsl:text><input name="Submit2" type="submit" value="Cancel" onclick="javascript: {ddwrt:GenFireServerEvent('__redirect={http://myserver/Lists/VTest/AllItems.aspx}')}" />the problem is the validation is not working properly. it submits the page without entering values for the required fields.particularly the validation is not working for DateFields.let me know what is the problem here. is it a Bug?muthu

How do I submit an attachment in an Infopath Form to a Sharepoint list?

I have already written code to submit my infopath data to my share point list, but now I need to find out how to submit an attachment to the same existing custom list in Share Point 2007.

attachment in mail not working on webserver


hi everybody i am using the mail sending facilily in asp.net using system.net.mail and system.net.mime.my code is work fine on local host but show the followiing error on webserver as exception

System.UnauthorizedAccessException: Access to the path 'C:\Inetpub\vhosts\dakshtechnology.com\httpdocs\Sec-77 Price List....doc' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at Recruitment.btnsubmit_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\dakshtechnology.com\httpdocs\Recruitment.aspx.cs:line 83

 i am using the following code

            if (fleupload.PostedFile != null)
                HttpPostedFile attfile = fleupload.PostedFile;
                int attachfilelength = attfile.ContentLength;
                if (attachfilelength > 0)
                    string attachfilename = Path.GetFileName(fleupload.PostedFile.FileName);

IE 9 Beta & InfoPath 2007 Form Radio Buttons Not Working



Has anyone else come across the IE9 bug that causes the radio buttons in the InfoPath 2007 forms to stop working (i.e. unselectable)?

Did you find a workaround (other than not to use IE9!)?



How to Get Attachment from an Infopath Form and Passes it to another infopath form in WorkFlow


Hi ,

how can I set a value inside an Infopath form task control ?

i used the following code but it's not working i don't know why

RequestSubmitted_TaskProperties.ExtendedProperties["attachctrl"] =Request.Attachctrl;


and i have another Issue the OnTaskChanged Event doesn't fires while i was submitting the TaskForm i don't know why

please advice



Zoom while working in form designer?


While working in the form designer of visual studio, is it possible to zoom into parts of the form for working in crowded areas? I can see how to zoom in and out of the code text with the ctrl key & middle mouse wheel, but I don't see a way to do that in the designer mode. Is there an addon perhaps that will allow this?


Custom Edit Form Attachment Problems (not the typical one)


Latest versions of MOSS 2007 and SPD with all SP and applicable hotfixes.

I create a new edit form by right-clicking on the original edit form and selecting "New from existing page".  Then I set to "default to master content" and then add a custom list form.  It works fine....attachments and everything. 

However, once I make any changes whatsoever within the newly-created DataFormWebPart, like moving a field to another cell or adding some text, the attach file function starts acting weird.  You hit the "Attach File" button on the toolbar and the DataForm is hidden and the attach file area is displayed as usual, but when you select a file and hit "OK", it simply blanks the attach file field and doesn't return to the DataForm.  You can select other files and attach them fine, but you have to hit "cancel" on the attach file function in order to return to the DataForm.  When you do that, the newly-added files are there and are saved properly when you save the list item.

I've spent days searching for a solution for this.  Any help would be greatly appreciated.

Edit:   This issue is also present on our development farm.  If nothing else, can somebody take a few minutes and try to duplicate?

Steps to Duplicate (in Sharepoint Designer

Problem opening an attachment from Infopath 2007 form in SharePoint 2010

I have an InfoPath 2007 form that is opened as a web based form in SharePoint 2010 that has an attachment control.  In Windows XP with IE 7 when you double click the attachment there is a warning message presented and after you click OK you get a prompt that asks if you want to open or save the file or cancel.  In Windows 7 with IE 8 when you double click the attachment there is a warning message presented and after you click OK you get a prompt that asks if you want to save the file or cancel, no open option.  I already set the SharePoint browser permission to permissive for the site and it doesn't help.  How can I get this to work in Windows 7 and IE 8?

textbox in the form but text_changed not working correctly



I got a textbox in my form and I want to when a user start typing in the textbox the listbox below the textbox will select the item that starts with that string

for example, it i type I

than in myserver side code will call that SearchString method which will go through that listbox and do the rest...

protected void CountryTxt_TextChanged(object sender, EventArgs e)
        string s = CountryTxt.Text;

the problem is it only stops in the textchanged after I press the enter key; it doesn't seem to work just by typing the characters in the textbox...

<asp:TextBox ID="MachineTxt"
         runat="server" Width="42px"
         ontextchanged="CountryTxt_TextChanged" AutoPostBack="True"> </asp:TextBox>

Can someone give me some indications whether I'm doing something wrong ?



Customized Project Approval using InfoPath form and workflows

I have an InfoPath form embedded in a MOSS 2007 page. The form is for requesting approval for a project. The submit button submits the form data to a form library. That triggers a workflow to get approval for the request.

So far, my workflow uses the "Collect Data From User" action and the "Send and email" action. I configured data collection option so that there are two inputs: two radio buttons for approve/reject and a comment field. I built the email body and subject using dynamic strings and variables from the form data.

I would like this approval process to be simple for the person that does the approval. Ideally, they could see the information in one webpage, approve or reject it, write a comment explaining why it was approved or rejected and then click some sort of submit button.

I haven't found an easy solution like that, so I went with sending an email and creating a task.

There are a few problems with this method:

 - The email that is sent when the task is assigned to the approver doesn't seem to be editable or have the option of being disabled (I don't want them to have a link to the XML for simplicity sake)
 - The link from the "You have been assigned as task" email is small and does not take you directly to the page where you can click "Complete Task"

Unexpected end of file looking for tag in customized form




I've created a custom list and have customized the NewForm by clicking "New from existing" and inserting the Custom list form. If I load it in the browser it works fine. I then delete a couple of rows and combine another - no major changes, really.  I save the form, then when I load it in the browser I get " Unexpected end of file looking for </ZoneTemplate> tag."  The perplexing thing here is that if I search in the code for </ZoneTemplate>, I find it!  I also find only one <ZoneTemplate>.  Can anyone tell me what is going on here?



How to get request.form working in masterpages?

Hi all,

On pages that use masterpages, request.form always return null. It works fine on pages without masterpage. Is this normal? How to use request.form in pages with masterpages?

Thanks in advance.

file attachment control on infopath 2010 browser form, validating event not fired


If preview within InfoPath 2010, the validating event is fired. But After deploying the form to SharePoint 2010, the validating event does not fire.

Any ideas?


Blog: http://convergingpoint.blogspot.com/

Inheriting Form Panel not working


When I inherit from PictureBox I can display my new Object on form, but when I use the same code to inherit from Panel, I don't see anything on the form when I add an object. My code looks something like this. It works fine for PictureBox, but not Panel. What Am I doing wrong.

    public class MyObject : Panel 
        public MyObject()

        private void InitializeComponent()

            this.BackColor = System.Drawing.Color.Red;
            this.Name = "ImagePanel";
            this.Size = new System.Drawing.Size(65, 70);
            this.Visible = true;

In main I created a form control and instatiate myObject and add to the form controls like this

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend