ASP.NET
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Tutorialized ForumsWeb Design & DevelopmentASP.NET

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old October 23rd, 2007, 12:14 AM
ahsanshafiq ahsanshafiq is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Oct 2007
Posts: 1 ahsanshafiq User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 16 sec
Reputation Power: 0
Problem with update panel in ajax.net

Hi, i am having problem with ajax.net updatepanel. I have an aspx page , in which i have an update panel . In the update panel i have place holder and i load a user control dynamically into the placeholder via ajax call. I have a button out side of the update panel some where else in the aspx page , which i use as a trigger to the update panel.Problem is that every things works fine for the first time, but on second click on the button , it posts back instead of using an asynchronous call to server.

Here is my code behind file :

public partial class dlgTesting : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

Button1.Attributes.Add("onclick", "document.getElementById('"+myDialogue.ClientID+"').style.display='block';");
AsyncPostBackTrigger foo = new AsyncPostBackTrigger();
foo.ControlID = "Button1";
foo.EventName = "Click";
UpdatePanel1.Triggers.Add(foo);
}

protected void Button1_Click(object sender, EventArgs e)
{

plcHdrDlg.Controls.Clear();
Control temp = LoadControl("~/UserControls/dialogues/tempDialogue.ascx");
plcHdrDlg.Controls.Add(temp);
UpdatePanel1.Update();
}
}



I would appreciate if some can help me identify and remove the problem.

Kind Regards,

Ahsan

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentASP.NET > Problem with update panel in ajax.net


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway