Object reference not set to an instance of an object.

S

Savas Ates

I have a datagrid and it has a dropdownlist which is named

<asp:DropDownList Runat=server ID="CIdeefixeSatis" SelectedIndex='<%#
SelectMyIndex(DataBinder.Eval(Container, "DataItem.ideefixesatis"))

In my SelectMyIndex Function

Dim ideefixesatisc As DropDownList

ideefixesatisc = CType(Page.FindControl("CIdeefixeSatis"), DropDownList)

There is no problem till that line but when i add



ideefixesatisc.DataTextField = "Stokta Var"

ideefixesatisc.SelectedIndex =
ideefixesatisc.Items.IndexOf(ideefixesatisc.Items.FindByValue("True"))



It returns

Line 53: ideefixesatisc.DataTextField = "Stokta Yok"
Object reference not set to an instance of an object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top