473,385 Members | 1,798 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.

Problem in dropdown control

29
Hi all,

Can anybody help me out in solving my problem.i want to display particular textbox based on selection in dropdown control using asp.net with c#.
thank u
Feb 9 '07 #1
3 960
hi,:)
<asp:DropDownList id="ddlist" OnSelectedIndexChanged="ddlist_SelectedIndexChange d" runat="server"
AutoPostBack="True">

on codebehind
Sub ddlist_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlist.SelectedIndexChanged
{-------
}

note that the function ur calling in OnSelectedIndexChanged should be public and the variable used should also be decalred public
I hope that this helps u
Feb 9 '07 #2
nmsreddi
366 256MB
Hello

You can make your control Autopostback property to true and write the c# code in selected index changed or selected indexchange commited what ever you need as per your requirement
Feb 9 '07 #3
Prabhua
29
Thank U very much to both of u. Your idea is very much useful to me.
Thank U once again.
Feb 9 '07 #4

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

Similar topics

0
by: Manish | last post by:
Hi All, I'm having this problem I hope someone can help provide a solution for it :) I've this dropdown list box in a usercontrol which I'm populating from the database (it's viewstate property...
7
by: Tim T | last post by:
Hi, I have the need to use dynamically loaded user controls in a webform page. I have the controls loading dynamically, and that part works fine. this is the code used in a webform to dynamically...
4
by: Simon Harvey | last post by:
Hi all, Am I being really stupid here: myDropDown.SelectedIndex = 2 I think this line should set the dropdown control's selected item to 2. But nothing seems to be happening on the page....
0
by: Mike | last post by:
Hi all! I have an OwnerDrawVariable ComboBox in .net. In the ComboBox DropDown event I display another control - works well. In the control's Leave event I remove the control - works well. So...
0
by: Fabuloussites | last post by:
I have a page that has multiview control that has two dropdown lists on it. the dropdown controls ARE NOT inside of the multiview. Each drop down is bound using its own sqldatasource conrtol. The...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
5
by: jung_h_park | last post by:
From: jung_h_park@yahoo.com Newsgroups: microsoft.public.dotnet.framework.aspnet Subject: Dropdown List not retaining its SelectedValue Date: Mon, 26 Jun 2006 21:02:57 -0700 Hello, My...
3
by: =?Utf-8?B?ZGVuIDIwMDU=?= | last post by:
Hi, Trouble in retaining values of dropdownlist, textboxes, and other controls when dropdownlist selectedindexchanged event is triggered, the controls are inside a user control and this user...
5
by: arnabit | last post by:
I have created a dropdown ,which is inside a panel and the panel is inside a place holder . the panel and the dropdown is created dynamically. I do have a button when the button is clicked i am...
5
by: =?Utf-8?B?Y2hlY2tyYWlzZXJAY29tbXVuaXR5Lm5vc3BhbQ== | last post by:
I have a VS 2008 ASP.NET webform that has a reportview tag on it, accessing an .RLDC report in local report. The columns for the report are essentially: Month Item #1 Item#2 Item#3 ...
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
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...
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...

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.