.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

Formview1 Submit submitting Formview2

Posted By:      Posted Date: August 23, 2010    Points: 0   Category :ASP.Net


I have a FormView control (FormView1) on a Panel next to another Panel containing another FormView (FormView2) on the same page.

Both FormViews share the same datasource.

FormView2 has Required Field Validation controls within it and FormView1 does not.

Both FormViews are set for DefaultMode of insert.

When I submit FormView1 the Validation controls within FormView2 fire and prevent submission, which of course I don't want to happen. I need both FormViews to function independent of the other.

Is it improper to have two FormViews on the same page and sharing the same datasource?

Thank you in advance.


View Complete Post

More Related Resource Links

Error submitting browser enabled form using this.Submit()

I'm trying to submit my Infopath form by calling this.Submit() method from my button click event handler.  According to Microsoft - Note: You can write a custom submit event handler for the Submit event, and then you can programmatically call the event handler by using the Submit method. This type or member can be accessed from code running in forms opened in Microsoft Office InfoPath 2007 or in a Web browser. Its not working for me and throws this exception  - XmlForm.Submit cannot be called from the SubmitEventHandler. BTW - I'm able to submit same form without any problem if I don't use this "Submit()" method.  I really want to know why its behaving like this.  Looks like a BUG.  Thanks, Suhaib Khan

I thought this would be simple... Trying to create a login does an ajax check before submit


I have the standard .net login control that is working.  (Still learning .net after 15yrs of classic)

What I want to do is OnButtonClick run a javascript function (to do an ajax call to the db to check if login is valid or not) and if it returns true, then submit the form normally, else don't submit. The piece that I can't figure out, is how to correctly override the default click even to hit my JS routine and then submit the form properly afterwards.

Thanks ahead of time

Data lost on submit


Dear Experts,

I have a modal popup and a GridView in it. The GridView is populated programmatically, i.e. I use .DataBind(). I can enter data into some of the GridView's controls. After I press Submit, I expect to do something with the entered data. But in the button press handler, the GridView is empty. I realize that I have to DataBind() again in the handler, but how can I preserve the data the user enters?


Infopath resets all data on a web from when submitting via the MAC



I'm seeing some very strange behaviour with some browser based Infopath forms.  The user is trying to fill the infopath form using safari on the Mac and when the user hits the submit button the form reset itself.

An other behaviour is that when the user click on a form field all the form fields will automatically populate one value.  This happen intermittently.

We have two load balancing web front ends. Server1 and Server2 the users that a reporting this problem get served by Server1 when I test on my Mac to replicate the problem the request get served by Server2. This problem occurs on different forms across the sharepoint implementation.

Can anybody shed any light on the problem?




Switch views when opening a form depending on submit locations?



I would like to know it was possible to switch views when opening a form depending on where the form has been submitted.

I am submitting my form to library A and library B and want to be able to open it in view 1 in library A and in view 2 in library B.

Is there a way to set some url conditions in the open behavior rules?

Thanks a lot!

Multiple Submit Connection Problem


Hello everyone,

I have an InfoPath form with two Submit Connections. One of them is a regular submit connection to a SharePoint Document Library. The other is a submit connection to the UpdateListItems web Service.

I have one button using rules that submits the forms fields to the Document Library. Some of those fields have data validation rules like entry must be four digits, and field cannot be blank.

The other submit button uses rules to submit an XML template to the UpdateListItems Template. My problem is that even though this second button does not have the first submit connection as an action, the form will still check all of the forms fields to see if they violate the validation rules before it will submit to the Web Service.

How do I tell InfoPath to ignore the validation rules when I only want to submit to the Web Service? I want the user to be able to enter data into the XML template fields and submit to the Web Service, even if some of the rest of the fields are blank. Right now if any of the other fields fail validation it prevents submittal to the web service even if the fields that failed validation are not being submitted to the web service.

Thanks for any advice that can be offered,
Bill Hurt

Button in a form that does not submit


I've been trying to figure this out all afternoon but my google-fu seems to be failing me. I'm setting up a page with a fairly large form, which has one field that is going to require some kind of popup page that will allow the user to perform a lookup. At the moment I'm only prototyping the page so I'm actually only attempting to a the button up to fire an alert when the button is clicked instead of generating a lookup screen. However it seems that no matter what I do the button causes the form to submit.

I remember one of the very first ASP .NET beginner videos I ever watched went through configuring a button to perform actions without submitting, but I can't seem to figure out which one it was.

Get information on FormView1 ?


Once you load the page in which event and how do I get information from the fields of a formView1?

Infopath form using Visual Studio - How to bind repeating table on submit button click ?


Hello friends,

   I have created infopath form using Visual Studio 2008

Form have 3 dropdowns and one repeating table which is bound by Datasource ( List from sharepoint ).

whenever i select appropritae values from drop down, Repeating table gets bound as datasource for dropdown and repeating table are same.

I have done conditional formating for repeating table using repeating table properties.


My Question:


Now i included one submit button and i want when i click submit button it will check DropDown Values and if appropriate record matching these values found it will fill repeating table

How i achive this ? as i dont find how to bind repeating table on submit button.

Please help if anyone have answer.


Thanks and Regards,


Kapil Bhosale.




Using ajax to submit and update form


Hi all,

  I'm new to ajax and not sure if it's necessarily the technology I need to accompolish what I'm looking to do. What I'd like to have is a simple two textbox and button form that let's the user submit some credentials (not for logging in) but instead to verify their identity for other purposes.  I would label the button as "Continue" and assuming it passes through, the form would update with some new data entry controls that would allow them to submit some final information.  I thought perhaps ajax would be a nice way to do this since I wouldn't need to create a second continuation page from the first to display a new form.  However, I'm unsure how it's possible to update the form in the first place to look different.  Or is there perhaps a cleaner way to do this?  Any help would be appreciated.  Thanks

Submit a aspx form to a sharepoint list?

Hi,I have a wizard control form in visual studio 2008.. I need to submit this form to a sharepoint list? Is this possible?thanks!

How to submit a form from code behind or something like that

Hi everyone,I dunno what would I do without the forum. I'm stucked again. Basically, what I am trying to figure out something like paypal where we call a specific URL from another web server and give them some information. Basically, I will have a URL like http://www.mysite.com/check_ur_balance.aspx?id=sth&blurblurblur where user call that URL and I query the information from the database and pass it back to the caller site.The flow is something like below:www.client.com  (hey give me this user balance) -> www.mysite.com (I query the user balance and send it back) -> www.client.comPlease help me out. Looking forward to receiving more input on this matter.

close ColorBox after from submit

I'm looking for code examples on how to close ColorBox modal window with a click of a submit button of a contact form inside the modal dialog, Thanks...

InfoPath Form: Encountered error while trying to submit the form from the browser

Hi,I have created a form in InfoPath, and i filled in the form in the browser. But there's an error apppeared when i tried to click on the submit button to submit the form. May i know is there ways for me to check what cause this error because i have no idea about this. "There has been an error while processing the form. There is an unclosed literal string. Line 1, position 543. System.Xml.XmlException: There is an unclosed literal string. Line 1, position 543. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at Microsoft.Office.InfoPath.Server.Xml.InfoPathXmlDocument.Load(XmlReader reader) at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataObject.<>c__DisplayClass3.<.ctor>b__0() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.Exception

Infopath Data Connections and Submit

We are in the process of shifting our draft system from SP 2007 to SP 2010 and we are re-visiting our Infopath forms service. Admin approved IP forms,  the templates emailed to our 12 remote 'offices' 12 Site collections -identical structure for remote locations 12 Remote user locations, never connected! ,fills in the form, selects own site, and emails back to office Custom button on form with rules reads 'selected site' and uses appropiate data connection to submit to correct Site Collection/Form Library. We are only using 1 site at the moment but obviously with 12 sites it becomes unmanagable, my thoughts;- Can we use a web service to act as an intermediary to point to correct library? Would a dataconnection library help?, or is the amount of work the same? ??? casey  

Issue inserting to database on submit the page goes blank

Hi guys,I'm new to asp.net, can someone please help me with this. I'm trying to insert few values to a table, when i press the submit button the aspx page goes blank and i don't get any error message. I'm not able to find where the error is.The code:Protected Sub AddMInfo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddMInfo.Click Dim dbsource As SqlDataSource dbsource = New SqlDataSource         dbsource.ConnectionString = ConfigurationManager.ConnectionStrings("dbConnectionString1").ToString         dbsource.InsertCommandType = SqlDataSourceCommandType.Text         dbsource.InsertCommand = "INSERT INTO db_mdl_info(dlprodid,dlmdlid,dlbrnd,dlmdlnm,dlmdlnbr,dlcpst,dlprsr,dlmxm,dlmim,dlmslt,dlmxps,dlmtpe)" &                                 "Values('" & DropDownList2.Text & "','" & DropDownList3.Text & "','" & MakeTextBox.text & "','" & DropDownList2.SelectedItem.Text &                                 "','" & MNoTextBox.Text & "','&quo
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