473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

UserControl causes full postback

3
Hi!
I have Placeholder within Update panel. On Page_Load i load user contol via this code:

Expand|Select|Wrap|Line Numbers
  1. Control ctrl = LoadControl("~/UserControls/ListViewThumbs.ascx");
  2.                             ucThumbs = (ListViewThumbs)ctrl;
  3.                             ucThumbs.ID = "ucThumbs";
  4.  
  5.  
  6.                             ucThumbs.SelectedIndexChanged += new UserControlSelectedIndexChanged(listView_SelectedIndexChanging);
  7.                             ucThumbs.ItemDoubleClicked += new UserControlItemDoubleClicked(UserControlDoubleClicked);
  8.  
  9.                             ucPH.Controls.Clear();
  10.                             ucPH.Controls.Add(ucThumbs);
  11.  
  12.  
  13.                             AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
  14.                             trigger.ControlID = ucThumbs.UniqueID;
  15.                             trigger.EventName = "ItemDoubleClicked";
  16.                             updateMyDocs.Triggers.Add(trigger);
  17.  
Below aspx code:

Expand|Select|Wrap|Line Numbers
  1. <asp:UpdatePanel ID="updateMyDocs" UpdateMode="Always" ChildrenAsTriggers = "true" EnableViewState = "true" runat="server">
  2. <ContentTemplate>
  3.     <asp:PlaceHolder ID="ucPH" runat="server"></asp:PlaceHolder>
  4. </ContentTemplate>
  5.  
Clicking in usercontrol causes full postback.. How can i prevent it?
Jul 10 '12 #1
0 1522

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tony Hedge | last post by:
Hello, I can briefly explain without providing any code, it's a simple NET 1.1 web project. I have a web form with a textbox A and button A (in a table row), and textbox B and button B (in a...
4
by: peshrad | last post by:
Hi ! I'm working with Win 2K and Visual Studio 2003. I have a problem because pressing <ENTER> in a text input control causes a postback of my web form. Here comes some example code (already...
0
by: jdp | last post by:
I have a dropdownlist on a panel within a atlas:updatepanel. While the code currently runs during a 'client' postback, I need it to run during a 'full page' postback. Is there a way to do this? ...
0
by: Dave | last post by:
Hi, I'm trying to download a pdf from a secure location and writ e the response to the browser as listed below. However, the form that runs this codes appears to postback when I encounter the...
0
by: gregfocker | last post by:
I'm playing w/this sample: http://ajax.asp.net/docs/tutorials/CreateSimpleAJAXApplication.aspx and am trying to get this to work in a UserControl. Clicking to select a different page of data...
0
by: seeker | last post by:
I am currently testing Ajax extensions on my website. I have created a gridview of cusomters from the Northwind sql server database inside an updatepanel and a scriptmanager all on the same page. ...
7
by: =?Utf-8?B?TWlrZSBMb2dhbg==?= | last post by:
My environment. .Net 2.0 VS2k5 SP1, IE6 (6.0.2900.2180) I have a web content page. The page will post back twice if I am running in debug mode. However if I run through the breakpoints fast...
0
by: =?Utf-8?B?TGlhbQ==?= | last post by:
Hi, I've implemented AJAX on to one of my pages, I am developing on Windows XP with VS05, I have IIS set up on XP so connect to the dev site using IE and when clicking a control on the...
2
by: Scott McNair | last post by:
Hi, I've been writing an application that relies heavily on user controls (there are 14 in all). Today it got to a point where it was ready to deploy, but when I try running it on any machine...
0
by: Nariban Barkan | last post by:
Hi All, I have two UserControls, KK1 and EFT1. Each one has one ScriptManagerProxy and one UpdatePanel . in addition to these, on first control (KK1) there is one button. on second control...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.