473,325 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

drop down menu list - dynamic generate

From my PHP page:

Grab all data from the database.
Go through a loop to generate the HTML.

Client side:
From the Color drop menu list, if a user change the value. It will
grab that value & update to the database based on the hidden ID.

DELETE ALL will delete everything the databse.
DELETE will only delete that specific row only.
ITEM, NAME, COLOR (single value), ID are store on a SQL database.

My question is:

How can I achieve this in C#.NET?

I am wondering if I can dynamic page like PHP. Thanks alot.

Output HTML from PHP:

< or = !
!table!
!form name="A_FORM" action="index.php" method="post" align="right"!

!tr!
!td!!/td!
!td!!/td!
!td!!/td!
!td align="left" valign="top"!
!input type="submit" value="DELETE ALL" name="DeleteAllName"
id="DeleteAllNameBut" !
!/td!
!/tr!

!tr!
!td align="left" valign="top"!Item!/td!
!td align="left" valign="top"!Name!/td!
!td align="left" valign="top"!Color!/td!
!/tr!
!/form!
!!-- A_FORM --!
!!-- new --!
!form name="NAME_FORM" action="index.php" method="post"
align="right"!

!tr!
!input type="hidden" value="411" name="ID"!
!td align="left" valign="top"!!b!Fruit!/b!!/td!

!td align="left" valign="top"!Apple!/td!

!td align="left" valign="top"!
!select name="nameStatus" onchange="submit();"!
!option id='nameDropID' value='Green' selected='selected'!Green!/
option!!option id='nameDropID' value='Red' !Red!/option!!option
id='nameDropID' value='White' !White!/option!!/select!
!/td!

!td align="left" valign="top"!
!input type="submit" value="DELETE" name="DeleteName"
id="DeleteNameBut" !
!/td!
!/tr!
!/form!

!!-- End --!
!!-- new --!
!form name="NAME_FORM" action="index.php" method="post"
align="right"!

!tr!
!input type="hidden" value="412" name="ID"!
!td align="left" valign="top"!!b!Vegetables!/b!!/td!

!td align="left" valign="top"!Carrot!/td!

!td align="left" valign="top"!
!select name="nameStatus" onchange="submit();"!
!option id='nameDropID' value='Green' !Green!/option!!option
id='nameDropID' value='Red' selected='selected'!Red!/option!!option
id='nameDropID' value='White' !White!/option!!/select!
!/td!

!td align="left" valign="top"!
!input type="submit" value="DELETE" name="DeleteName"
id="DeleteNameBut" !
!/td!
!/tr!
!/form!

!!-- End --!
!!-- new --!
!form name="NAME_FORM" action="index.php" method="post"
align="right"!

!tr!
!input type="hidden" value="416" name="ID"!
!td align="left" valign="top"!!/td!

!td align="left" valign="top"!Brocolli!/td!

!td align="left" valign="top"!
!select name="nameStatus" onchange="submit();"!
!option id='nameDropID' value='Green' selected='selected'!Green!/
option!!option id='nameDropID' value='Red' !Red!/option!!option
id='nameDropID' value='White' !White!/option!!/select!
!/td!

!td align="left" valign="top"!
!input type="submit" value="DELETE" name="DeleteName"
id="DeleteNameBut" !
!/td!
!/tr!
!/form!

!!-- End --!

!!-- new --!
!form name="NAME_FORM" action="index.php" method="post"
align="right"!

!tr!
!input type="hidden" value="413" name="ID"!
!td align="left" valign="top"!!b!Car!/b!!/td!

!td align="left" valign="top"!BMW!/td!

!td align="left" valign="top"!
!select name="nameStatus" onchange="submit();"!
!option id='nameDropID' value='Green' !Green!/option!!option
id='nameDropID' value='Red' selected='selected'!Red!/option!!option
id='nameDropID' value='White' !White!/option!!/select!
!/td!

!td align="left" valign="top"!
!input type="submit" value="DELETE" name="DeleteName"
id="DeleteNameBut" !
!/td!
!/tr!
!/form!

!!-- End --!

!/table!
Oct 6 '08 #1
0 1685

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

Similar topics

7
by: jorntk | last post by:
How can i make a drop down menu that are dynamiclly generated base on the value selected in another drop down menu? thanks nad regards Jorn
1
by: Jonny Tango | last post by:
Hello everyone. Q. How do I create a dynamically-generated drop-down list for use in an array. I'm using PHP with a MySQL database (through phpMyAdmin) My database table is called...
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
2
by: pantagruel | last post by:
I have an old web application I did where browsers with dynamic capabilities received a drop down menu on the top of the page and a fold out on the left hand side of the page and non-dynamic...
3
by: scaredemz | last post by:
hi, so i'm creating a dynamic drop-down menu. the menu and the text show up fine in IE but only the drop-down shows in Firefox without the menu text. Below is the fxn code. help pls. function...
3
by: Andrew | last post by:
Hello, friends, I was asked to implement a .aspx page with drop down menus. When a mouse pointer moves over a menu bar, a drop down list containing sub-menus will show up. Thus a user may select...
19
by: mart2006 | last post by:
I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters what is shown in the dynamic menu....
6
by: mcgrew.michael | last post by:
I hope this is the right group. I am very new to ASP so this is probably a stupid question. I have some vbscript that query's AD and populates a recordset. I know the recorset contains the...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.