Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using ASP.Net AJAX UpdatePanel with Version 4.09Using ASP.Net AJAX UpdatePanel with Version 4.09
Previous
 
Next
New Post
12/28/2008 6:05 PM
 

Ok, I'm stuck. I am trying to use ASP.Net AJAX in a custom module. I have confirmed that my module is accessing AJAX with the following code...

If DotNetNuke.Framework.AJAX.IsInstalled Then
    Response.Write("AJAX Installed")
    DotNetNuke.Framework.AJAX.RegisterScriptManager()
    DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(Me.Panel1, True)
Else
   Response.Write("AJAX Not Installed")
End If

And as you can see I register the ScriptManager and attempt to wrap a panel in an UpdatePanel. The Panel has a button and a Label. When you click the button it updates the label to the current date and time. (Standard test code). When I do this, the page does a normal postback. It reloads the whole screen, not just the panel.

 I removed the line "DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(Me.Panel1, True)" and try to use an update panel in the page itself. When I do this I get the following error on the page... 

Object reference not set to an instance of an object.

The Error in the event viewer reads...

DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at System.Web.UI.PageRequestManager.ProcessUpdatePanels() at System.Web.UI.PageRequestManager.RenderPageCallback(HtmlTextWriter writer, Control pageControl) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at DotNetNuke.Framework.PageBase.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
 

Bottom line is, I need to know the proper way to include custom ASP.Net AJAX functionality to my custom module. I would prefer to use as much of the AJAX toolkit as possible since I already know how to use the controls.

Thanks in advance for your help.

 
New Post
2/20/2009 6:11 PM
 

Are you referencing any page methods in your OnInit handler?  I had a similar problem and removing references to the page object in my OnInit method fixed the issue. 

Ie:

protected override void OnInit(object sender)

{

if(!Page.IsPostBack)

{

<some code here>

}
}

 
New Post
3/15/2010 11:11 AM
 

I am still able to reference my page from the load event while using ajax as long as I use the following code.

If me isnot nothing then

if me.ispostback=false

dowork()

end if

end if

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using ASP.Net AJAX UpdatePanel with Version 4.09Using ASP.Net AJAX UpdatePanel with Version 4.09


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out