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

How to view values selected from a dropdownlist

1
Heres what i did:
Expand|Select|Wrap|Line Numbers
  1.  Protected Sub DropDownList2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList2.SelectedIndexChanged
  2.  
  3.        if DropDownList1.SelectedValue = "Author" then
  4.           MsgBox("a")
  5.         ElseIf DropDownList1.SelectedValue = "ISBN" Then
  6.           MsgBox("i")
  7.         Else
  8.          MsgBox("Select something")
  9.         End If
Oct 22 '09 #1
3 1563
CroCrew
564 Expert 512MB
This is a asp.net question not a Classic ASP question.

All the best,
CroCrew~
Oct 22 '09 #2
jhardman
3,406 Expert 2GB
I moved it to the right place for you. Hope you find a good answer here.

Jared
Oct 22 '09 #3
Frinavale
9,735 Expert Mod 8TB
You haven't really stated what the problem is.

Maybe it's the fact that you are trying to use a Message Box to display the selected value. There is no such feature in ASP.NET (MsgBox is only available in windows desktop applications).

Try placing a Label on the page and set the Text property of the label to show the selected value instead.

-Frinny
Oct 27 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: sunstarwu | last post by:
Hi, I am having difficultly being able to view certain Columns and rows via a DropDownList. Everytime I load my webpage.aspx it just shows empty drop down menus. I have no problem showing all...
4
by: Roger R. Smith | last post by:
Hi all, I am sure you have seen this issue. I have an aspx page which loads a UserControl at runtime. In this user control I have a dropdownlist which is populated dynamically. If I click a submit...
2
by: louise raisbeck | last post by:
Hi there. I am a little confused. SelectedValue is a property of ListBox and dropdownlist. However it isnt in the list of properties in intellisence (html view i am not talking about code behind...
10
by: dhnriverside | last post by:
Hi guys Still having a problem with this dropdownlist. Basically, I've got 4. The first 2 work fine, then my code crashes on the 3rd. ddlEndTimeHour.Items.FindByValue(endTime).Selected =...
2
by: Pipo | last post by:
Nobody knows how to get the values provided in the client can be read in the user-control? If have made a Web Custom Control with 2 textboxes and 1 dropdownlist. The user fills in my control (the...
7
by: segal.aviad | last post by:
Hi, I'm trying to write a web page containing three dropdowns. The dropdowns are declared as follows: <asp:DropDownList id="cmbCat1" runat="server" AutoPostBack="true"></asp:DropDownList>...
3
by: Sully | last post by:
Hi, I am having a small problem generating an e-mail via an online form. I am creating an e-mail using the MailMessage command and I know that you have to do something special to render the values...
1
by: Roffers | last post by:
Okay I have a parent page, we'll call it parent.aspx and it holds the following two user controls <uc1:Box1 id="Box1" runat="server"></uc1:Box1<----THIS CONTAINS A DROP DOWN LIST <br>...
3
by: Iain | last post by:
Hi All I have 2 DropDownList boxes on a page. The first (id= "Operation") is populated on PageLoad with the contents of a database table. The second id="WorkStations" will not be populated...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.