473,473 Members | 4,176 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

drop down list

hi,
i am developing web application using c#.
in a particular page i am using two drop down list boxes, one for
product and the other for corresponding models of a product. whenever i
select a product the corresponding models will be populated in the
model drop down list. and i am using ajax for populating the model ddl.
hence the model ddl will be populated at the client. now when i do my
processing using the datum in the page i am getting the error
object reference not set to an instance of an object.

i think i am not able to read data at server which is populated at
client.
what is the solution fot this problem?

kalaivanan

Nov 13 '06 #1
2 6906
Dont read the selected item from the drop down list. Get the selected item
from the form data (Request.Form["ddlname"]). The ddl wont automatically know
what was selected as it didnt originally send down the data that has been
selected. You may be able to fill it will a complete list of models on
Page_Init in order for it to be able to pick but using the form data is quite
easy and definately works.

Ciaran O'Donnell

"kalaivanan" wrote:
hi,
i am developing web application using c#.
in a particular page i am using two drop down list boxes, one for
product and the other for corresponding models of a product. whenever i
select a product the corresponding models will be populated in the
model drop down list. and i am using ajax for populating the model ddl.
hence the model ddl will be populated at the client. now when i do my
processing using the datum in the page i am getting the error
object reference not set to an instance of an object.

i think i am not able to read data at server which is populated at
client.
what is the solution fot this problem?

kalaivanan

Nov 13 '06 #2

Ciaran O''Donnell wrote:
Dont read the selected item from the drop down list. Get the selected item
from the form data (Request.Form["ddlname"]). The ddl wont automatically know
what was selected as it didnt originally send down the data that has been
selected. You may be able to fill it will a complete list of models on
Page_Init in order for it to be able to pick but using the form data is quite
easy and definately works.

Ciaran O'Donnell

"kalaivanan" wrote:
hi,
i am developing web application using c#.
in a particular page i am using two drop down list boxes, one for
product and the other for corresponding models of a product. whenever i
select a product the corresponding models will be populated in the
model drop down list. and i am using ajax for populating the model ddl.
hence the model ddl will be populated at the client. now when i do my
processing using the datum in the page i am getting the error
object reference not set to an instance of an object.

i think i am not able to read data at server which is populated at
client.
what is the solution fot this problem?

kalaivanan
thanks man. it works
Nov 13 '06 #3

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

Similar topics

3
by: Miguel Dias Moura | last post by:
Hello, i have an ASP.NET / VB page where i have a few 4 groups of Drop Down Lists. Each group of Drop Down Lists include 3 Drop Down Lists for date such as: DAY, MONTH, and YEAR. I don't want...
3
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box...
13
by: Leszek Taratuta | last post by:
Hello, I have several drop-down lists on my ASP.NET page. I need to keep data sources of these lists in Session State. What would be the most effective method to serialize this kind of data...
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...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
1
by: pmelanso | last post by:
Hello, I have a drop down list which is dynatically loaded from a database and I have a second drop down list that is also dynatically loaded depending on what is selected in the first drop down...
8
by: Ed Dror | last post by:
Hi there ASP.NET 2.0 VB & SQL Express Lest take Northwind Categories Products as example I create a table that hold these two together and I create a stored procedure like select ProductID,...
5
by: ashok893 | last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list...
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: penny111 | last post by:
Hi there, For my application, i need to have 3 drop down lists 1. drop down list of folder names 2. drop down list of documents in the folder selected 3. drop down list of instances of the...
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
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.