473,749 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I get the dropdown's selected value

Hello
Can you help me.
By ASP
How can I get the dropdown(contro l'name)'s selected value?
What is it's property'name?

Jul 19 '05 #1
24 77385
London wrote:
Hello
Can you help me.
By ASP
How can I get the dropdown(contro l'name)'s selected value?
What is it's property'name?


Give the dropdown element a name, using its name property.

Then, in the asp page to which you are submitting the form, just do this (if
using POST):
<%
selectedvalue = request.form("n ame_of_dropdown ")
.....
%>

or this, if using GET:
<%
selectedvalue = request.queryst ring("name_of_d ropdown")
.....
%>

HTH,
Bob Barrows

Jul 19 '05 #2
> By ASP
How can I get the dropdown(contro l'name)'s selected value?
What is it's property'name?


Using ASP, you'll have to resubmit your form first. After submitting your
form, try the following...

'Let's assume the name of your dropdown list is ControlName.
Response.Write request("Contro lName")
Jul 19 '05 #3
<select name="XYZ">
<option value="1">One</option>
<option value="2">Two</option>
</select>

If method="post" -
Request.Form("X YZ")

If method="get"
Request.Queryst ring("XYZ")

Ray at work
"London" <lo************ @yahoo.co.jp> wrote in message
news:u1******** ******@TK2MSFTN GP12.phx.gbl...
Hello
Can you help me.
By ASP
How can I get the dropdown(contro l'name)'s selected value?
What is it's property'name?

Jul 19 '05 #4
First it has to be in a Form and the Form has to be "Submitted" to an
ASP page. If the control's Name is "DdList", then the ASP page you
submitted to would retreive it with any one of these:

Request.Form("D dList")

How you handle it from that point is up to you.
--

Phillip Windell [CCNA, MVP, MCP]
pw******@wandtv .com
WAND-TV (ABC Affiliate)
www.wandtv.com

"London" <lo************ @yahoo.co.jp> wrote in message
news:u1******** ******@TK2MSFTN GP12.phx.gbl...
Hello
Can you help me.
By ASP
How can I get the dropdown(contro l'name)'s selected value?
What is it's property'name?

Jul 19 '05 #5
In article <u1************ **@TK2MSFTNGP12 .phx.gbl>, louxiangyu2000
@yahoo.co.jp says...
Hello
Can you help me.
By ASP
How can I get the dropdown(contro l'name)'s selected value?
What is it's property'name?

Man, you *are* an idoit!

-- Guinness
Jul 19 '05 #6
Don't listen to him, London. Everyone posting here started out as an egg
and a sperm and had to take it from there. You can post any questions here,
from total beginner level, to total expert level. Don't be discouraged by
the idoits [sic] who post nonsense.

Ray at work
"Guinness Mann" <GM***@dublin.c om> wrote in message
news:MP******** *************** *@news.newsguy. com...
In article <u1************ **@TK2MSFTNGP12 .phx.gbl>, louxiangyu2000
@yahoo.co.jp says...
Hello
Can you help me.
By ASP
How can I get the dropdown(contro l'name)'s selected value?
What is it's property'name?

Man, you *are* an idoit!

-- Guinness

Jul 19 '05 #7
In article <#p************ *@TK2MSFTNGP11. phx.gbl>, "Ray at <%
=sLocation%>" <myfirstname at lane34 dot com> says...
Don't be discouraged by the idoits [sic] who post nonsense.
Can you help me.
By ASP
How can I get the dropdown(contro l'name)'s selected value?
What is it's property'name?

Man, you *are* an idoit!


I just wanted to use the word idoit!

Jul 19 '05 #8
In article <#p************ *@TK2MSFTNGP11. phx.gbl>, "Ray at <%
=sLocation%>" <myfirstname at lane34 dot com> says...
Don't listen to him, London. Everyone posting here started out as an egg
and a sperm and had to take it from there. You can post any questions here,
from total beginner level, to total expert level. Don't be discouraged by
the idoits [sic] who post nonsense.

Ray at work


P.S. I notice you didn't answer his question... :-)
Jul 19 '05 #9
Ah, but I did.

"Guinness Mann" <GM***@dublin.c om> wrote in message
news:MP******** *************** *@news.newsguy. com...

P.S. I notice you didn't answer his question... :-)

Jul 19 '05 #10

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

Similar topics

0
2148
by: Kannan.M.R | last post by:
Hi, I have a problem in assigning the selected value in the dropdown to a hidden control. It goes like this. I have a repeater control. In the repeater control’s item template, I have a hidden control and a placeholder control. I must generate the required number of dropdowns and the buttons dynamically based on a field value in my dataset. So I do the same in my code behind and add the generated controls to the place holder in the...
0
1551
by: Kannan.M.R | last post by:
hi, I have a repeater. In the item template of the repeater i have a place holder control. In the item databound event of the repeater, In a for loop, i create dropdowns and buttons in a loop and add the same to the placeholder. I bind a datatable as the datasource for the dropdown. The requirement is to get the selected value in the dropdown. The problem i have here is, Since i must be able to repaint the whole control on the page, i must...
1
392
by: Andy Sutorius | last post by:
Hi, I have 4 panels, each panel has a dropdown and a "next" button. I would like to get the selected value of the dropdown after the next button is clicked. I thought I could use the following (ddlChooseEmail.SelectedValue) to grab the value but it does not work. Is there something special about panels that I need to do in order to get the selected value of the dropdown? Thanks,
6
5398
by: Jenna Alten | last post by:
I have a datagrid with a template column that contains a dropdown list. I currently fill and display the dropdown list on the page load. This is working correctly. I am NOT using an Edit Column. I am receiving errors when trying to set the selected value of the dropdown within the ItemDataBound() subroutine. Below is the code I am using. I hope someone can tell me if this is possible. '''HTML''' <asp:datagrid id="dgAssignments"...
1
10399
by: Ben | last post by:
I have a formview with a few dropdownlists (software version, database version, etc). When a software version is selected, the database version dropdownlist updates itself accordingly. When in edit mode, everything works fine - the selected value in each list defaults to the value from the database record (selectedvalue=bind...). However, in insert mode (insertitem), it is not working. I pass in a value on the query string that I would...
1
14314
by: CorporateCoder | last post by:
Hi, I am trying to bind the selected value of a databound dropdown box in a databound gridview control to the value being displayed in the template column the dropdown box has been added to. Both the grid and the dropdown box are retrieving and displaying data fine, I just cant bind the two together. I followed the instructions in the help document called 'Walkthrough: Displaying a Drop-Down List While Editing in the GridView Web...
4
2513
by: Ronny Mandal | last post by:
Hi! I have an .aspx with some controls that are created dynamically. The items are populated into the box by setting the DataSource-property to a list. In addition I specify the text and value with DataTextField and DataValueField; this works as expected. However, my problems arises when I want to read the selected value (i.e. after a postback caused by a change in the DropDown), the selected item is always the first item in the...
17
5475
by: jerrydigital | last post by:
Hello, I have an edit user page that allows the user to view their user information and make changes if possible. I have a simple html login page that directs to an asp page called edituser.asp when they login. Here is the edituser.asp code I have <%@ Language=VBScript %> <% Option Explicit %> <!--#include virtual="/adovbs.inc"--> <html> <body> <%
1
6298
by: techbytes | last post by:
hi, I have 2 dropdowns ,after populating the dropdown with selected values,the page is refreshed. so the selected value in the dropdown is not retained in the dropdown list. I want to retain the selected value in the dropdown after the form is submitted.
0
8833
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4709
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3320
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.