mardi 17 octobre 2017

binding an asp.net checkbox on serverside

Hi i have an search functionality in which the checkbox should come as checked or unchecked based on the data these check boxes were multiple and i am doing it on server side here i have is the code

<asp:CheckBox ID="AApBlue" runat="server"Checked='<%#GetBoolean(Eval("blueFlag").ToString()) %>'/>Blue

.cs file 
 protected Boolean GetBoolean(string val)
        {
            return val == "Y" ? true : false;
        }

I am getting an error object reference null pointer exception ,please help




Aucun commentaire:

Enregistrer un commentaire