ciao a tutti,
io dichiaro nella mia classe un placeholder
poi dentro ad una SUB mi creo un HyperLink, lo setto e lo passo al mio placeholder.
però ricevo questo errore:codice:Protected WithEvents btn_Next As System.Web.UI.WebControls.PlaceHolder Dim btnNext As HyperLink btnNext.ImageUrl = "images\bottoni\bottnext.gif" btnNext.NavigateUrl = "lista.aspx?cat=" & cat.Replace(" '", "''") & "&p=" & CurrentPage + 1 btn_Next.Controls.Add(btnNext)
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
su questa riga:
btnNext.ImageUrl = "images\bottoni\bottnext.gif"
![]()
![]()
![]()
![]()

Rispondi quotando