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

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

Form problem

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net


   I am using a third party control to display Address in form, to do that I have to use 


 <form method="post" name="address">  

Since the form has a Master Page, so initially, I had closed </form> tag of master & then used <form....> for third party control. Everything is working ok. But now the problem is due to </form><form..>(as shown above), when I click on Compatibility View button in IE; the textboxes after the above two lines are displayed in a separate table & some gap comes in between the form like:

                            First Name:

                            Last Name:

                                              <-------- Gap in between & address shifted to LHS.



   How can this Gap be avoided & Address1,etc. can come under Last name???? 

View Complete Post

More Related Resource Links

c# form problem with list item


I've got a c# form containing a listbox how ever i cant get

listbox1.items.Selected      to work



neither work. both not giving me the option for .selected nor selectedvalue

how does this work on c# forms as it works the above way on webforms....

POST from html form viewstate problem

<p> Hi all, I have a website where people need to pay for a specific download (.pdf file). After they payed they get the download(A). My payment-provider can do a HTML-Postback to the site i want, for each succesfull payment. So the idea is that if someone payed, they do a postback to my server with a couple of parameters, so i can know that that specific email address has payed, and they get the download. I tested localy with a .html file on my desktop to postback a set of parameters to my local asp.net website. But in ONLY works if i include the __VIEWSTATE in my html file. And i cant get rid of the viewstate in my HTML of the aspx page. >test.html: <html><head></head><body> <h1>Dit is een test</h1> <form id="form1" action="http://localhost:25659/WebForm1.aspx" method="POST"> <input id="Button1" type="submit" value="submit!"/> 'IT ONLY WORKS IF I INCLUDE THE NEXT LINE: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjA0OTM4MTAwNGRk" /> </form></body></html> Has anybody an idea to acomplish my goal? Maybe i can get some info about the postback in my global.asax? or create a HttpHandler for .html files? Anyone?   Thanks in advance, Vincent   </p>

namespace of fields problem when creating form template from xml?

I created a form template from a predefined xml, where I do not have any namespace. Later I added more fields. The output xml of the form is for the fields from the xml they have not prefix, for those added later, they have prefix my. I already have them all done. How can I make them consistent to have prefix my? Is there any options in InfoPath to turn on or off the prefix my?   thanks,

ListData.svc form library problem

Hey, I can use this listdata.svc/Tasks?$select=title for a list. but I can't use it $select=name/Name for a form library, it saids "web page can't be found". but if I remove $select=name it can be displayed. Does anybody have idea about $select columns for a form library? Thanks in advance! Lindyhttp://www.dreamingcatstudio.com

AJAX Form POST Request to a DLL Problem

I am using AJAX javascript for POSTING a complete HTML form to the server which is an external dll on a different server and displaying the response. The server-response is displayed in a "div" . basically i need to show a poll in a .aspx page which is basic a question with 3 options & a button. Now on click of submit button i need to post the data to a dll & show the result from the dll itself. Any idea how to do this? is it possible..any code???

Need to solve Form Authentication Problem

Hi all, I have a web site with login page and other pages. For login page currently i put authentication mode = Form. Problem is, when login 2 diffenent user in same pc and 1 browser with 2 tab, first tab is 1 user and 2nd tab is another user. I used Form Authentication ticket ,so for each users has different tickets. After login the 1st user and create a entry , then 2nd user login and trying to create entry that time 2nd user ticket is reset to 1st user ticket. is it any way to avoid this issue? if anyone knows about this please give me your suggestion and example. Thanks S.Shangar  

Problem to save infopath form data in database.

Hi i have a win application which host infopath forms. i want to save infopath form data in database. to do this, in my table, i have xml dataType which store infopath form data. my problem is when i load xml form into string variable and save to database, i got this exception : XML parsing: line 1, character 38, unable to switch the encoding Here is my sample infopath form data in xml format : <?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution solutionVersion="" productVersion="12.0.0" PIVersion="" href="file:///C:\Users\Hamed\Documents\customForm1.xsn" name="urn:schemas-microsoft-com:office:infopath:customForm1:-myXSD-2010-09-11T10-56-47" ?><?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.2"?><my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-09-11T10:56:47" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-us"> <my:txtFirstName>b</my:txtFirstName> <my:txtLastName>c</my:txtLastName> <my:txtFatherName>d</my:txtFatherName> <my:txtNationalCode>e</my:txtNational

Problem to open infopath form : The file cannot be opened because it is not a valid InfoPath form

Hi i have a winform app which host of infopath forms. form templates and data stores in database and when user want to open/edit an existing infopath form data, it must be extract from database, save on disk and then open it to display it in formControl. my problem is that when i open form data, after it has been extracted on disk, i got this error : InfoPath cannot open the following file: C:\Users\Hamed\Documents\Visual Studio 2008\Projects\InfopathFormTest2\InfopathFormTest2\bin\Debug\d00d73e8-cf5c-4b12-b9a6-591c4ade83aa.xml. The file cannot be opened because it is not a valid InfoPath form.  The processing instruction in the file is missing or invalid. here is my code : this._fullPath = System.IO.Path.Combine(Application.StartupPath, this._dataRow.FormID.ToString() + ".xml"); this._templatePath = System.IO.Path.Combine(Application.StartupPath, this._templateRow.TemplateID.ToString() + ".xsn");if (HelperClass.ExtractToDisc(_fullPath, ASCIIEncoding.Unicode.GetBytes(this._dataRow.FormContent))) { this.formControl1.Open(_fullPath); this.txtFormName.Text = this._dataRow.FormName; } where is my problem and how to solve this ? thanks in advancehttp://www.codeproject.com/KB/codegen/DatabaseHelper.aspx

css to form tag problem

Hi.Trying to add css to an inner form that is fetched via SQL.if i use css:form { border: 5px solid #000000; }then this only apply to the first form (the webform) and none of the other forms inside of it.I also tried declaring a class and adding the same code for that class in css but it does nothing.Anyone encountered this before?// Joakim

Form based Authentication - OpenLdap problem

Hi everyone,   I try to set up FBA with LdapMembership provider.   I have configured web app + STS like this : <add name="LDAPMember" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" server="server" port="389" useSSL="false" connectionUsername="uid=portal_sharepoint,ou=people,dc=corp,dc=contoso,dc=com" connectionPassward="somthing" userDNAttribute="distinguishedName" userNameAttribute="cn" userContainer="ou=people,dc=corp,dc=carrefour,dc=com" userObjectClass="person" userFilter="((eduPersonOrgUnitDN=cn=portal_sharepoint,ou=applications,ou=organizations,dc=corp,dc=contoso,dc=com))" scope="Subtree" otherRequiredUserAttributes="sn,givenname,cn" />   I can without problem use the people picker and get user information from it. But when i try to authenticate user i have an error that say : An exception occurred when trying to issue security token: The security token username and password could not be validated.   If i look my log on the ldap i see that all the time it's the portal dn that is used to authenticate user.   I

"Could not verify the form template on the specified server" problem

I have an InfoPath 2010 form that I'm trying to publish as a browser-based form to a SharePoint 2010 Form Library.   It passes the compatibility checker if the "Verify on server" box is not marked, but will not validate on the server, giving only the message: Could not verify the form template on the specified server: http://portal.mydomainname.com/_vti_bin/FormsServices.asmx Make sure you are connected to the network and have access to the server. Browsing to the above URL brings up the FormsServicesWebService page just fine. The "portal.mydomainname.com" is in the Default zone.  Authentication provider for the Default zone is Windows NTLM with Client Integration enabled.  The server is registered with an enterprise key.  Forms Services is configured to allow browser-enabled forms. Any other ideas? Thanks -BobBob

membership provider with custom login form problem / question

Hi all, I am using the .net membership provider, and I can get past the membership.validate user ok and into my secure page.   The problem I have is that when I reach the secured page, I have a login status control which isn't changing from login to logout.   Below is my login code:If Membership.ValidateUser(txtUsername.Text, txtPassword.Text) Then Response.Redirect("/auth/Default.aspx") If chkRememberMe.Checked Then FormsAuthentication.SetAuthCookie(txtUsername.Text, True) Else FormsAuthentication.SetAuthCookie(txtUsername.Text, False) End If Else lblLoginStatus.Text = "Oops! Login not found!" End If    Thanks in advance.

Problem with VBScript in the form.


I got a sample form with VBScript to make my project, but I can't run the sample. Can anyone help? It came with an .asp file, I couldn't run it on the server, so I changed it name to .aspx and it worked. But, I get a few warnings and then an error when I execute. It came with 2 .dlls and I referenced them.

This is the code:



<script type="text/javascript">

var hexTemplate1;

var hexTemplate2;

var hexTemplate1Valid=0;

var hexTemplate2Valid=0;


var Template1Mask;

var Template2Mask;

function BeginRegistration()


var regCtl = document.getElementById("DPBioControl");

regCtl.AttachSensorEvent(this, "controlEventHandler", "JScript");



var verCtl= document.getElementById("DPVerControl");




if((hexTemplate1Valid!=true) || (hexTemplate2Valid!=true))








function HideControl(id)



Problem with InfoPath 2007 Form opened with InfoPath 2010 - whole number integer not coming into dat


I found an issue when testing existing InfoPath 2007 forms via the Infopath 2010 Designer client.  Integer fields in the form template are publishing to a SharePoint Forms Library and show in the default view.  However, if that library is then used as a Data Connection in another or same form template those integer fields are not displaying or available for selection. 

This is not a problem using the InfoPath 2007 client.  It is not an option to convert the field to text as it could affect existing forms in existing libraries.  Also, existing integer fields are no longer appearing in previously defined SharePoint-based secondary data connections.  Only the ID field still appears.  But, those existing fields still work in the form and are selectable for functions, etc.

Is there a solution to this?

Thanks much!  Mike - www.ProgramNetInc.com


Problem hosting a WPF user control in a windows form application

I have a windows forms application and want to to use WPF inside this application. So I have add a WPF user control into my project. Then I take a ElementHost from the toolbox and put it on my windows forms. The problem is now, when I want to add the WPF control with "Edit Host Content" I get the message "This ElementHost is currently not hosting any editable content....." What's wrong? How can I embed my implemented WPF control into the ElementHost ?

Problem with Oracle Stored Procedure/Web Form(C#)



I receive the following message when trying to insert a record into a table via Web Form(C#):

Error: Invalid operation. Connection closed.

The button event, when clicked, should connect to the database and then call the stored procedure and
insert a new record according to the text input on the Web Form. Hence, returning the new flight id (TID).

Note: Some entries can be null.



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Add_Flight.aspx.cs" Inherits="Add_Flight" %>   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> .style1 { width: 89%; } .style2 { height: 23px; } .style3 { width: 360px; } .style4 { width: 137px; } .style5 { height: 23px; width: 137px; } .style6 { width: 95px; } .style7 { height: 23px; width: 95px; } .style8 { width: 200px; } .style9 { width: 129px; } </style> </head> <body> <form id="form1" runat="server"> <div> <table cellspacing="3" class="styl

Problem merging toolstrip control placed in UserControl with MDI Form menu


I currently have an MDI application with a MenuStrip as Main Menu. The application has a child form where an instance of one UserControl with a MenuStrip is dynamically created when the form is loaded. The MenuStrip contained on this UserControl is correctly merged with the Menu of the MDI container. In response to a button click on the child form, an instance of another UserControl is created, containing a different Menu and the previously UserControl instance is discarded. The expected action is that the menu of the second UserControl will replace the menu of the first UserControl on the MDI container menu, but this is not happening and the main menu keeps the menu items of the first UserControl.

How can I force the merging of the menu contained on the second user control with the Main Menu.

Thanks in advance.

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