Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting new DB record on aspx sing VS2005 1

Status
Not open for further replies.

martinm

IS-IT--Management
Mar 30, 2001
113
GB
I have a GridView and DataSource.

The grid has select/edit options, but I can't find an 'insert' option.

I have linked the params of the DataSource to Text boxes, but can't find a method to actually insert - the Query exists.

What am I missing!!
 
1st this post would be better suited for the asp.net forums within tek-tips.

for your web form. the GridView does not have an insert option. Only Select/Edit/Delete. You have 2 options for inserting a new record. Use the FormView in insert mode, or manually insert a record using the datasource insert parameters.

If you choose option 2 there are as many "correct" methods as there are developers. If you already have the controls linked to the datasource all you need is a button/event hook to call datasource.insert.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Hi - should've said, I'm using C# and letting VS do the ASP stuff!!

I've tried

dsAddress.InsertParameters;

already, but get a build error:

Only assignment, call, increment, decrement, and new object expressions can be used as a statement
 
C#, VB, J#... it all relates to asp.net. The people in that forum are more exprienced with the datasource controls.

post the aspx and code behind that apply to binding and we should be able to get this working for you.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top