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

drop down list - dynamic?

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:
\< html will show sample code

\<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 4 '08 #1
0 1404

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

Similar topics

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: pmud | last post by:
Hi, I have 2 drop down lists on an asp.Net page. The 1st contains alphabets. When the user selects an alphabet frm the first list, the second drop down list should be populated with names from...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
2
by: jagdishl | last post by:
hi I have to populate the second drop down list based on the selection made in the previous drop down list.I have to chose between two values in the first dropdown list i.e city and county.This is...
4
by: tjonsek | last post by:
I have two drop down boxes on a form. One feeds the second a list options based on user selection. With the second drop down, I want code that displays dynamic text in a <div> based on whatever the...
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...
1
by: Jeff Gardner | last post by:
Greetings: I have a table with 3 pieces of data that I would like to use to dynamically populate 3 drop downs using javascript. The fields are state, orgname, office. If it's not already...
2
by: cpptutor2000 | last post by:
Could some PHP guru please help me? I am creating a dynamic dropdown list using a code snippet(Section A) as below: Section A: $sql_query=mysql_query("SELECT DISTINCT semester, year from...
4
by: audreyality | last post by:
I am new to javascript and appreciate any guidance on this issue, so thank you in advance for your advice! Situation: I am working with a form that will send information to a database. I need the...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.