Hi all

I have a DropDownList in in one of my web application's Page, now i want to display the contents of that DropDownList in another Page. Can someone please show me the code for this in C#. When i try to use the DropDownList in this other page it doesn't recognise it because the DropDownList is not in that Page, it is a different page. please help...

Thanks!

Recommended Answers

All 4 Replies

put ur dropdownlist in user control. Then u just need to include the user control on any place or any page when u need to use the dropdownlist.

put ur dropdownlist in user control. Then u just need to include the user control on any place or any page when u need to use the dropdownlist.

Can you please explain more about this user control or give me a example. I don't really understand it.

easier way out would be store the datalist contents in probably a datatable and save to the session variable and read the session variable, type cast to datatable and get the contents.

hi,
it can be written using session.first we create a session for the selected item in the dropdownlist and redirect to next page.
In the newxt page we retrieve this session and use it for the specified purpose using convert option
hope this helps
bye

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.