473,796 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page to Create New Record/FormView

One thing I've spent a lot of time doing is creating a page where the user
enters data for a new database record. I need to layout all the controls,
implement any validation controls, and handle a submit button.

For my current project, I'd like to be more efficient. So I'm playing with
the FormView a little. I'm able to display a record. And if I select the
Edit template in the designer, I can see edit boxes for each field, but I
haven't figured out how to use this control to enter a new record at
runtime.

Any tips? And I assume validation must still be done manually?

Thanks!

Jonathan

Aug 14 '08 #1
1 1086
I found the DefaultMode property. Looks like that's the answer. And any
validation must be done manually.

Jonathan

"Jonathan Wood" <jw***@softcirc uits.comwrote in message
news:OI******** *****@TK2MSFTNG P06.phx.gbl...
One thing I've spent a lot of time doing is creating a page where the user
enters data for a new database record. I need to layout all the controls,
implement any validation controls, and handle a submit button.

For my current project, I'd like to be more efficient. So I'm playing with
the FormView a little. I'm able to display a record. And if I select the
Edit template in the designer, I can see edit boxes for each field, but I
haven't figured out how to use this control to enter a new record at
runtime.

Any tips? And I assume validation must still be done manually?

Thanks!

Jonathan
Aug 14 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1508
by: Jawahar | last post by:
All, I have a form view that allows edit (updates) and Inserts (Add a new detail row) . THe formview is populated via a SqlDatasource that is fitered by value that is passed to the SqlDatasource Filter expression. When try to add a new detail record for the ID passed to the Filter Expression I am not able to get it initial ID value (which is the DataKey for the FormView). For example CustomerID say 123 has three orders now I want to...
8
2649
by: jenileo | last post by:
Hello! I'm fairly new to asp.net and I am struggling with getting my form to post to the database and transfer the user to a new page. I am using the FormView control. After the user completes the form, they click the insert button. The insertbutton has command="insert" which is auto generated when you use the formcontrol. I tried to add an onclick event as well that does a server.transfer and it seems the onclick event overrides the...
2
3323
by: Dabbler | last post by:
What's the best way to return to GridView after editing a detail record in a FormView so the GridView shows the page with the edited record on it? I'm using GridView with standard ObjectDataSource, no custom paging. Thanks for any tips on this.
0
876
by: Islamegy® | last post by:
After inserting a new Record in FormView it switch to the old Page not the last inserted page.. I need to position it on the last inserted row.. How could i do so?? thanx
0
1137
by: davidgreen24 | last post by:
Suppose I have a SQLDataSource object that returns 20 rows. I have a FormView object bound to this control. Now when I click a hyperlink (with querystring param called productID) I want the row with Product ID="3765" (using this as an example) to be the one displayed in a FormView Control. If I modify my SQLDataSource object to have a WHERE clause (e.g. WHERE Product ID=...) then the SQLDataSource only returns one record and I've lost my...
1
1744
by: Chris | last post by:
I have a treeview control, which I use to select a row in a table which will be used to populate a formview. Depending on what node is selected in the treeview I want the formview to be either in update or insert mode. Protected Sub tvwmenu_SelectedNodeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tvwmenu.SelectedNodeChanged ViewState("menuid") = menuid ViewState("parentid") = parentid If menuid <0 Then
3
2387
by: sudhashekhar30 | last post by:
hi all i am using formview control(asp.net 2.0) 1rst time. don't know much about it. i want to display record in it from different tables at different time. like 1rst time form view is showing record of tableEmp. 2nd time same formview showing record of tableSalary.i am using c# coding. is it possible to bind data from code behind file? if possible, how? i would also like to know how i can bind formview from datagrid(select event) thanks....
1
3114
by: dan | last post by:
Hi, I think I need a gridview, formview, another gridview, and another formview on a single page. There is a parent-child relationship between the first gridview and the formview and then between second gridview and the second formview. There is also a parent-child relationship between the first formview and the second gridview. Does the above look like a good practice in asp.net?
2
6975
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html and i am implementing it in my website....
0
9679
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.