Languages :: Csharp :: .Net :: Accessing a DropDownList inside a repeater... |
|||
| By: j_coreil |
Date: 29/08/2003 00:00:00 |
Points: 500 | Status: Answered Quality : Excellent |
|
I have a repeater and within it I have multiple textboxes and 2 repeaters. It is bound to a DataTable within a DataSet. 1) If I change the values of the bound textboxes will it change/update the value within the dataset/datatable? 2) How do I access the DropDownList(s) within the repeater to a) assign values since it is not bound to the dataset/datatable b) get the selected value within the DropDownList? Basically I have a bunch or information that cannot be put into a datagrid because of time constraints and the requirment of this having to be "pretty" for the users. They need to see all the current data and be able to add more rows. If this is vague then please tell me and I will explain more. Any and all help will be very much appreciated. Jonathan Coreil |
|||
| By: VGR | Date: 29/08/2003 07:10:00 | Type : Comment |
|
| is this Delphi ? |
|||
| By: daniel_c | Date: 29/08/2003 08:55:00 | Type : Comment |
|
| Might be .NET, since he uses repeater object. |
|||
| By: j_coreil | Date: 29/08/2003 12:00:00 | Type : Comment |
|
| Man I'm sorry, I thought I posted this inside the ASP section. Yes it is .NET. |
|||
| By: VGR | Date: 30/08/2003 18:30:00 | Type : Comment |
|
| then sorry, man, I know only real development stuff |
|||
| By: navjotvirdi | Date: 30/08/2003 19:37:00 | Type : Comment |
|
| send me ur code. I will write ADO code to do that. pls click accept button whenever u satisfied with my answer |
|||
| By: j_coreil | Date: 30/08/2003 20:18:00 | Type : Comment |
|
| First off I would like to say that the comment about real development stuff is uncalled for. Sure .NET has it's holes and limitations but come on, there needs to be a mutual respect between developers regarding which enviroment he or she is developing in. This was given to me at my work and to tell you the truth I would not have chose to do to what needs to be done using the architecture they have in place. But that is all besides the point. .NET is a language that alot of people use and are going to use, mainstream corporate America is moving away from Delphi and Perl and everything else so us developers who do this for a living will have to move away from Delphi, Java, JSPs, Beans, Corba, and all those type of tools. I wish this were not true but it is. XML via MS Soap as the middleware is winning and .NET is the enviroment that most people are using. So... Learn something about ASPs or keep your comments to yourself. Note I didn't no degrade Delphi or anything because I have developed in almost every language listed here. I'll post my code ASP HTML and Code behind soon. |
|||
| By: VGR | Date: 30/08/2003 21:16:00 | Type : Assist |
|
| well, it was humour, but as you want to go off-road, let's go (it'll be my last message in this thread) : 1) I don't see ASP.Net as a language but a framework. The language can be VBasic Script, C# or even Delphi 2) I don't see ASP.Net winning. In fact, it CAN NOT win. Why ? Because it's tied to a share-losing platform : OS and webserver : IIS is now at 25% market share, going down... Apache is winning. Windows can only lose market shares, and it does (thanks linux and Mac OS/OS X) 3) Apache, PHP and MySql are platform-independent. IIS, ASP.Net and SQL-Server are the exact contrary. Who do you think is gonna win in a "globalized" world ? ;-) 4) PHP pseudo-compiled is faster than ASP.Net (pseudo-compiled too), as PHP interpreted is faster than ASP (interpreted too) 5) if you ***really*** look for a language/environment which is fast, serious, reliable, and platform-independent, then go for Delphi ;-) (AS/400, Windows, Kylix on linux, Delphi/.Net on .Net) |
|||
| By: j_coreil | Date: 30/08/2003 21:25:00 | Type : Comment |
|
| I totally agree about PHP being faster. You are also correct about .NET being a framework and ASP not being a language. I will always admit all of this but just please don't go around saying that ASP .NET is not a real development stuff. It's sad enough that I have to settle for a job using .NET but come on, I have pride too lol. |
|||
| By: son_robin | Date: 01/09/2003 19:17:00 | Type : Assist |
|
| 1. No, the Dataset/Datatable will not get updated 2A. You can access the Dropdown list as cboTest.Items(0) in the code behind where cboTest is the Id of the dropdowns that is created inside the repeater control and Items(0) refers the first control in the repeater. 2B. cboTest.Items(0).Selected gives weather a particular option is selected in the drop down. |
|||
| By: pstavrinides | Date: 01/09/2003 19:34:00 | Type : Answer |
|
| To get back to the issue at hand..... To add a value to a dropdownlist: Dim newListItem As New ListItem() newListItem.Text = "my new item" Booking.Items.Add(newListItem) or to add at a specific index: Booking.Items.Insert(0, newListItem) To retrieve a value: dropdownlist.SelectedItem.Value It makes no difference if the dropdownlist is databound or not this will work for either but to update the dataset you will have to do it explicitly |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








