473,385 Members | 1,893 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,385 software developers and data experts.

drop down menu list

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:

<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 3 '08 #1
0 1318

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

Similar topics

0
by: vikram.cvk | last post by:
Hello Experts, Im trying to design a CSS vertical drop down menu which should have the following functionality. Home About Us | -->Overview
6
by: Adrienne | last post by:
http://www.intraproducts.com/beta/infinicall/index.asp has a drop down menu on Investor Relations. The markup and CSS are both valid, and most of the time, the menu drops down correctly. However,...
2
by: hemanth.singamsetty | last post by:
Hello there, I've a drop down menu (created using CSS & Javascript -- see code below). My problem is, whenever I click a link on the menu the new page replaces the current page (and the menu...
4
by: simon.cigoj | last post by:
I have an javascript made menu and some forms with the dropdown element. When the menu opens and scrolls down the drop down is displeyed over the menu and obscures the menu choices. I have this...
17
by: Aussie Rules | last post by:
Hi, I want to have a single line combo box dropdown, but where i can selected multiple items in the drop down via a check box... I can see one in the standard tool box... is there one ? If...
4
by: Laura K | last post by:
I have a drop down menu which has a list of subcategories and the initial value is "please choose a Subcategory". When the user chooses a subcategory they are taken to a new page where the drop...
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...
3
by: SQLjunky | last post by:
Hello, Contrary to what my screen name indicates, i'm actually quite new to SQL. Having said that, I'll get right into my problem. I'm trying to query an mssql database to return to the value...
22
by: Archanak | last post by:
Hi, I am using 2-level CSS Drop Down Menu in my perl/CGI program. here is the code. #!c:/perl/bin/perl.exe use CGI qw(:standard);
0
by: mjohnson0321 | last post by:
I am trying to incorporate a CSS drop-down menu into a site (suckerfish menu). The menu gets lost behind the content below it, but only on one of the drop downs (News). The error occurs on all of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.