|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
DropDown within a Datalist
Hi,
I'm stuck on problem regarding a dropdown within a datalist and hope someone can help. Within the datalist I have a number of drop down's and text box's populated from queries. The text boxs get populated fine but the dropdowns throw up this error Object reference not set to an instance of an object my code behind page for populating one of the dropdowns is : Dim dReader As System.Data.OracleClient.OracleDataReader If Not Page.IsPostBack Then OracleConnection1.Open() dReader = OracleSelectCommand2.ExecuteReader Status.DataSource = dReader '****this line throws up the error**** Status.DataTextField = "pen_userid" Status.DataValueField = "pen_id" Status.DataBind() dReader.Close() OracleConnection1.Close() End if The aspx page for the dropdown : <form> <asp:datalist id="DataList1" runat="server"> <ItemTemplate> <TABLE id="Table4" border="0"> <TR> <TD> <asp:dropdownlist id="Status" runat="server" Width="152px" autopostback="True"> <asp:dropdownlist> </TD> </TR> </ItemTemplate> </asp:datalist> </form> I'm using VB.NET..Any help would be much appreciated and I look forward to the replies. Rgds DSG Last edited by Dsg : November 2nd, 2004 at 03:43 AM. Reason: Apologies..I wanted to start a new topic not reply to the previous thread |
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > DropDown within a Datalist |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|