Hi Suresh,
Though you haven't provided enough details here, lemme try.
First of all, this dropdownlist control needs databinding. Check with your
control properties, if you are setting them right.
Check if you are setting the table property to a valid table reference.
Next, On a computer that has Microsoft .NET Framework 1.0 installed (and
that does not have Microsoft Visual Studio .NET installed), when you try to
access data using ADO Interop on an ASP.NET page that resides at an
identical site and that is hosted on the same computer, you may receive the
following error message:
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Look here for details:
http://support.microsoft.com/default.aspx?scid=kb;en-us;810098
As another reason, the control might just not be available to your compiler.
If you are using the OnItemDataBound event, you have to check first whether
the ListItemType is Item or AlternatingItem. You get the error because the
OnItemDataBound event is first executed for the HeaderTemplate, which
doesn't contain your control.
Use something like this:
Sub DataList1_ItemDataBound(sender As Object, _
e As DataListItemEventArgs)
If(e.Item.ItemType=ListItemType.Item Or _
e.Item.ItemType=ListItemType.AlternatingItem) Then
' your code here
End If
Specifically for web apps, session, by default, is set to be placed as
cookie. All I had to do is to set
cookieless="true" in web.config
Hope this helps.
Anushi