Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2045
WebDropDown AutoPostBack Null error
posted

I have WebDropDown control that shows images and text. Works fine if AutoPosttBack=false. If I enabled Postback and select item I got System.NullReferenceException error on <img source line in ASPX.

Here is my code:

    <ig:WebDropDown ID="WebDropDown1" runat="server" Width="200px"
        DataSourceID="ObjectDataSource1" TextField="groupname" ValueField="groupid"
           CurrentValue="Add Permission To Group/User" AutoPostBack="True" >
            <DropDownItemBinding TextField="groupname" ValueField="groupid"></DropDownItemBinding>
           <ItemTemplate>
                <img src='<%# Eval("id").ToString()=="1" ? "../images/group.png" : "../images/user.png" %>' alt="" width="16" height="16" />
                <%# DataBinder.Eval(Container.DataItem, "groupname")%>
               </ItemTemplate>
    </ig:WebDropDown>

Parents
  • 13438
    Suggested Answer
    posted

    Hello Al,

    Please take a look at the attached sample created via NetAdvantage 11.2.20112.1019 and tested under IE9. The sample does not provide the misbehavior you are facing. Please modify it or create a new one reproducing the issue in order to be able to provide any help. Please also specify if your build of NetAdvantage is different or if  you are using different browser.

    77806.zip
Reply Children