.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

Customizing the Insert/Edit Forms

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :ASP.Net
Hi, I need to have 2 tables show in one webform(one-to-one relationship). I have tried customizing the Insert webform from the PageTemplates(creating the entity folder under CustomPages and copying the Insert page from PageTemplates), but it shows a lot of duplicate errors, e.g. The type GRIPS.Insert already contains a definition for DynamicDatamanager1, ScriptManagerProxy, etc... Can anyone tell me what I'm doing wrong? Thanks, CC

View Complete Post

More Related Resource Links

Detecting Edit or Insert Page


I am coding a .cs file that handles the metadata for a particular table. I am putting a custom validation that allows me to update or insert only if the PubMedID is not already in the database. This would be easy except that the PMID should also be allowed to be null as some of the references in the database were not from PubMed. So i perform a query on the database to see if there is already an identical PMID in the database. This works great when using Insert. However, when using Edit, it does not. The PMID is already in the database because the one currently being edited has the same PMID!!! So I know exactly how to change my query etc. However, I do not know how to tell from inside this Edit/Insert agnostic page, which one it is being called from. Thanks for your help! 

review, edit and insert data using 2 diffrent database



is it possible to create a custom list in sharepoint designer to enter a vacation request and using a work flow that goes to the HR department. but when the HR department approve the request the HR can store these requested data into another database?

what i mean is, the employee fill a form in to request some vacation days using a custom list in my wss3 site. i assume that these data will be stored in the WSS_content database. now when the HR department get this filled form they have to store the data of the form in to a database but not in the WSS_Content database.

is this possible?

Insert and Edit Pages with Web User Control Template for another table

Hi, I have an Address template(web user control) which holds the fields of the Address table.  The Address template is embedded in the School Insert Page.  I want to insert a new school together with its address(which means I have to insert a record into the address table).  Can you let me know how I can pass the newly generated addressId to update school table?  Also, how can I associate the Address.cs in the App_Code with the Address template?  I want it to be able to scaffold columns which needs to be hidden from user in the address table.  When I click on Insert School, the Address template shows in "insert" mode, I just need to link the two together. Thanks for your help! CC  

Custom Insert / Edit Pages

I'm working with a legacy database that is not normalized, nor can i change it to normalize it and/or add relationships. I've successfully got my List and Details pages up and running and am now moving on to insert/edit. Here's my challenge: The insert page needs to accept data that will be written to multiple tables (i.e. consider a customer call where we're creating the customer, the customer address record, etc. on the fly). In addition, the customer can either be a "customer" or a "prospect", each being a separate table. Any suggestions as the best approach to tackling this issue. My gut feel is that I should write a standard aspx page and hook up the data manually. Not sure how to navigate to this page from the insert / edit button (modified routing). Thanks.

Add subform to New, Edit, and View forms

I have two lists with related information: Projects and Tasks. I would like to edit the NewForm, EditForm, and ViewForm for the Projects list so that users can add, change, and view related tasks in a datasheet subform. I know how to do this in Access forms, but it seems there is no easy way to accomplish something similar using SharePoint lists and the SharePoint Designer. I have seen other posts, listed below. http://social.technet.microsoft.com/Forums/en/onlineservicessharepoint/thread/f803ee36-8853-4a73-8d10-1fc687a37781 This is not very helpful, for users would have to be jumping from one list to another and manually creating the relationships between projects and tasks. That is cumbersome. http://geekswithblogs.net/SoYouKnow/archive/2008/12/24/creating-a-sharepoint-list-parent--child-relationship---out.aspx This relates to what I need, but I guess there is something wrong with the steps, as I cannot get the parent form to set parameters for the subform. Has anybody been able to accomplish this?

Sharepoint 2010 add/edit form: Insert link from sharepoint disabled




I have a list with enhanced rich textbox field. I can click on Insert link, "from addres" is enabled, but "from Sharepoint" is disabled.

Is there a reason why is this button disabled? Field is enhanced rich textbox... Paste button is also disabled.



Customizing Windows Forms TreeNode



I want to create a treeview with dropdown lists. In fact, I need to add DropDownList to the TreeNode. I've done this with WPF but I couldn't find a way to do that on Windows forms control. Is it possible to customize the TreeNode control in order to add a dropdown box? 



Enabling Edit , delete and insert in Data view with linked sources


Hello ....


I create a data view in sharepoint designer 2007 that has linked sources (Join between two lists) ....


How can I enable edit, delete and insert links in this data view  ????.... taking in consideration that options available in data view properties appear in gray ...



Sharepoint Foundation - Create and deploy custom edit/view forms for external lists


Firstly, we are using sharepoint foundation so Infopath forms are not an option for us.

We have a Visual Studio sharepoint project which deploys a complete sharepoint site. The site contains a number of external lists and we want to be able to create customised view/edit forms for these lists and add them to our Visual Studio project so they can be deployed as part of the new site. The idea is that we can deploy the solution to a fresh site with a default set of forms which can then be customised for different implementations of the site.

Here's the steps we have been using to try and do this:

1. Deploy the base project (BDC) to the sharepoint site

2. Create external lists based on the BDC content types

3. Use Sharepoint Designer to create new edit/view forms for the lists and set these as the default forms for the list

3. Save the site as a template

4. Import the template into a new Visual Studio project and select the lists we require. This gives us a List Definition, a pages module (with element file), an elements file and a schema file (both for the List Instance).

5. We then add the contents of the imported project to our main solution as follows:

  • Create a new List Definition (including List Instance)
  • Copy the contents of the imported Elements.xml to the Elements file for our List Instance.

How to edit WF Forms with Infopath - and where to save


I've not been trained in InfoPath 2010 and SPD 2010 but I have to quickly redo this workflow that got destroyed during our 2007 to 2010 migration.  I'm hoping this is an easy question for you guys to answer!

SPD creates xsn forms for my workflow for initiation and the various tasks.  If I click one of these, there is an option to edit it in Infopath.  It opens in Infopath, and I can make my edits easily enough (mostly text / visual changes) but then how do I get it to save the form back to the workflow?  When I go to save it, it's asking me where to save it and I'm just not sure how to make it relate to the workflow.  I had hoped it would automatically save back to the workflow but that doesn't seem to be the case.  

Please help!


MOSS 2007 Strange Problem with edit forms, content types and document library columns


I'm having a strange problem and have not been able to track down any useful answers over google.

I inherited a SharePoint site that I am now making some changes to.

I am having problems with one document library.  We had custom edit forms on this document library, which I was finding a pain to maintain so I reset them back to the site definition.  This edit form now shows only those fields that are associated with the Document content type (the only content type - I've deleted the others) on the document library.  There are other columns on this document library that are NOT associated with the content type that I would like to show on the edit form but they are not available when I try to add them to the content type via Settings > Document Content Type > Add from existing site or list columns.  The select columns from drop down is set to List Columns.  The Additional Authors column is just not there.

I CAN see this field on the all items view for the document library, it is there and populated with data.

Setting the Allow Managed content types radio button to NO does not have any impact on which fields are visible on the form- I still see those same fields that have been associated with the Document content type.

Has anyone else seen this or does anyone have any thoughts?? 

They will be muc

FindControl In DetailsView Edit & Insert ItemTemplate


Hey,guys. I got a problem about finding controls in Edit/Insert Itemtemplate inside a DetailsView.

Here is the code.

I put a Label (id= "Label6") to test whether the findcontrol method works or not. Unfortunately, I almost tried every means but still coudn't find it.

protected void Page_Load(object sender, EventArgs e)

  //Edit Button OnCommand
  protected void ButtonEditOnCommand(object sender, CommandEventArgs e)
  if (e.CommandName == "Edit")

  // Update Button OnCommand
  protected void ButtonUpdateOnCommand(object sender, CommandEventArgs e)
  if (e.CommandName == "Update")
  string sql = "UPDATE StudentInfo SET StudentName=@studentname, Score=@score, Grade=@grade, Remarks=@remarks WHERE ID=@id";
  SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["sqlconn"].ToString());
  SqlCommand cmd = new SqlCommand(sql, conn);

  // find controls
  if (DetailsView1.CurrentMode == DetailsViewMode.Edit)
  TextBox EditStudentName = (TextBox)DetailsView1.FindControl("TextBoxEditStudentName");
  TextBox EditScore = (TextBox)DetailsView1.FindControl("TextBoxEditScore");
  TextBox EditGrade

New/Edit Default Form Link for InfoPath Created Forms


I've created 2 forms using InfoPath (Edit & New).  Both forms publish correctly, however I would like the "New" form to display by default when a user creates a New list item, and the "Edit" form to display (by default) when a user attempts to Edit an existing item.

Currently, Each form is available, but the New Form displays by default for either action.  The get the Edit form, the user has to select the the Edit form from the View dropdown box.  I'd really rather not have the dropdown box at all, and simply open the correct form per the action requested by the user.


Customizing SharePoint List Forms in InfoPath 2010

Learn how to customize the forms for viewing and editing items in a SharePoint list with the InfoPath Designer, and then take the forms offline using SharePoint Workspace.

Sample: Customizing SharePoint List Forms in InfoPath 2010

Explore the code sample as you learn to customize the forms for viewing and editing items in a SharePoint list with the InfoPath Designer, and then take the forms offline using SharePoint Workspace.

customizing Content Editor in Edit Mode


Whenever we add Content Editor webpart ,We get the  the default instruction

To add content, open the tool pane and then click Rich Text Editor.how to remove this default  text  and add the custom text for this .

Sharepoint Foundation 2010 - How to control which fields are shown on new/edit/view forms for Extern


I have an external list which contains a DateTime field.  For the display I have added an additional string field to the BDC Entity , so i can display the date in whatever format is required.  But i still need the actual date field so a Date picker is rendered on the edit form.  How can I display the string field on the generated Display Form and the date field on the Edit Form.

I have tried adding the following to the field declaration (in the List schema) for the string field so that it's only shown on view forms, but that didn't work.   

  • ShowInDisplayForm="TRUE" ShowInEditForm="FALSE" ShowInNewForm="FALSE" ShowInViewForms="TRUE"

Am i missing something, or is this yet another 'feature' of external lists which looks like it should work but doesn't? 

I know i could create custom iew and Edit Forms manually t

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