Creating a notification from code behind (VB)

3 posts, 1 answers
  1. Trevor
    Trevor avatar
    6 posts
    Member since:
    Dec 2011

    Posted 23 May 2012 Link to this post

    I am trying to create a RadNotification from the code behind of an .aspx page but I keep getting "Object reference not set to an instance of an object."  

    I am creating a new RadNotification like so:

    Dim notification As New RadNotification
    
    and then try to show it:
    
    notification.Show()

    I understand that this notification would be empty but I have also tried giving it a title and some text but that doesn't seem to work either.

    What else do I have to provide?  Is it even possible to do this?


  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 24 May 2012 Link to this post

    Hi Trevor,

    Try adding the control to the form as shown below.

    VB:
    Dim notification As New Telerik.Web.UI.RadNotification()
    form1.Controls.Add(notification)
    notification.Show()

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Trevor
    Trevor avatar
    6 posts
    Member since:
    Dec 2011

    Posted 24 May 2012 Link to this post

    That did it, thanks a lot.
Back to Top