Monday, March 26, 2012

insert, select, update and delete

I've got four pages with in the first page a insert, in the second a select, in the thirth a update and in the fourth a delete statement. First the values of a textbox will be inserted in the database, then the values will be shown in labels and than it is possible to edit or delete the values inserted. Every inserted item belonging to each other has one ID. The follwing values has a second ID etc.

How can I make that possible?? I think that I should pass the ID's between the pages so I'm sure that I edit or delete the values that I want. So insert value 1 in page 1, show with select value 1 in page 2, edit or delete value 1 in page 3 and 4.

Maybe I didn't explain it good enough for you, please tell me then!!

Thanks!!

I think I got a solution for it. On every top of the page the user can select a value in a dropdownlist. The selected value calls the database and selects the appropriate row. Now I can update and delete the row I want. To update the values of the database I got for each value a textboxt. On selectedindexchanged the textbox.text will filled with the values of the appropriate row and now I can adjust the textboxes and update the values. Or I can delete the row with another button. This is in theory but practical it's hard. Does someone has suggestions or hints??|||Which version of ASP.NET and which version of SQL Server are you using? Your questions are a bit too vague (and possibly in the incorrect forum) to be able to be of much help to you.

If you are using ASP.NET 2.0 you might try theTutorials on this site.|||I was affraid of that, second try:
I have a dropdownlist with values as NEW and BonsaiName1, BonsaiName2. When the NEW is selected all textboxes are empty and can be filled with data that can be inserted into the database and BonsaiName3 is created. When BonsaiName1 or BonsaiName2 etc is selected the textboxes should be filled with the correspondending data out of the database with a SELECT procedure. They can now be edited by a UPDATE or DELETE statement.
My question is: When I got a dropdownlist1.selectedvalue how do I get this in the SELECTstatement in the WHEREpart. I think the best way is with a parameter but how?
I'm running ASP.NET 2.0 and SQL Server 2005.
Thanks!!

No comments:

Post a Comment