Handle Null value of DropDownList selection using FindByText in ASP.Net

Last Reply 10 months ago By pandeyism

Posted 10 months ago

I have null values in gridview cell, when select row from gridview which have some null values, then when it get load into dropdown list then my application get crashed.

so how to handle null values which is in cell of gridview...for dropdown list.

mentioned below query to load data into dropdown list on gridview selectedinexchanged

string SesnId3 = dm.GetData("select TID from dbo.Item_Type where TName='" + GVitem.SelectedRow.Cells[5].Text.Trim() + "'").Rows[0][0].ToString();
DDPack.SelectedValue = SesnId3;


This question does not have replies that have been liked.