473,761 Members | 4,407 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RegisterRequire sPostback failing to call LoadPostData

I am getting a curious problem where LoadPostData is not being called after
registering the control using RegisterRequire sPostback. Other controls not
requiring postback registration are having LoadPostData called. Each
control calling RegisterRequire sPostback does have a uniqueid and exists for
the lifetime of the page, so it's not a mis-referencing problem.

It's worth noting that this was working fine until I killed the Viewstate
and emitted an empty Viewstate hidden field instead. Is it possible that
somewhere in the inner workings of the page class there is some dependency
between RegisterRequire sPostback and the Viewstate?

Any clues?

JB
Nov 18 '05 #1
2 3281
Hi,

there is dependency such way that Page class checks existence of VIEWSTATE
and EVENTTARGET form elements at the beginnig of request to detect the
postback mode (it returns the request data collection based on this). If
both __VIEWSTATE and __EVENTTARGET hidden form elements are missing
completely, request collection is null.This same collection is the one that
is passed to the LoadPostData method (still LoadPostData should be called in
any case). But I suppose you have removed only the __VIEWSTATE hidden field,
so it can't be the problem.

Can you tell/post some code that demonstrates where do you do the
registration for postback handling?

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"John Burke" <no@offence.net > wrote in message
news:eZ******** ******@TK2MSFTN GP10.phx.gbl...
I am getting a curious problem where LoadPostData is not being called after
registering the control using RegisterRequire sPostback. Other controls not
requiring postback registration are having LoadPostData called. Each
control calling RegisterRequire sPostback does have a uniqueid and exists for
the lifetime of the page, so it's not a mis-referencing problem.

It's worth noting that this was working fine until I killed the Viewstate
and emitted an empty Viewstate hidden field instead. Is it possible that
somewhere in the inner workings of the page class there is some dependency
between RegisterRequire sPostback and the Viewstate?

Any clues?

JB

Nov 18 '05 #2
Sam
Is it possible that somehow the Viewstate is carrying the ID of the
malfunctioning control? If it wasn't restored before LoadPostData
then of course that event wouldn't fire.

Make sure the ID of the control is being set in Init (either
explicitly or because you add it the the Controls collection) and
doesn't change during the lifecycle. But I assume you've already
tried these simple tests... Once though I had a similiar problem
because I added the control in Init and explicity set its ID in Page
Load, thus inadvertantly skipping the 1st ProcessPostData stage.

-Sam

"John Burke" <no@offence.net > wrote in message news:<eZ******* *******@TK2MSFT NGP10.phx.gbl>. ..
I am getting a curious problem where LoadPostData is not being called after
registering the control using RegisterRequire sPostback. Other controls not
requiring postback registration are having LoadPostData called. Each
control calling RegisterRequire sPostback does have a uniqueid and exists for
the lifetime of the page, so it's not a mis-referencing problem.

It's worth noting that this was working fine until I killed the Viewstate
and emitted an empty Viewstate hidden field instead. Is it possible that
somewhere in the inner workings of the page class there is some dependency
between RegisterRequire sPostback and the Viewstate?

Any clues?

JB

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
298
by: Sundeep Gawande | last post by:
I am facing a strange problem. I am trying to host a .NET(C#) control in a VC6 COM ocx. Now when I create the control using CreateControl(...) or CoCreateInstance(...) my call is failing with the error module not found. The .NET control was having some std. controls like buttons and text boxes in it. Now I removed all these controls and just tried to create a plain control, and it worked OK. This is strange.
1
3058
by: William F. Robertson, Jr. | last post by:
I have a control called UniqueTextBox, that implements the IPostBackDataHandler. I have trying to use the control in a composite control called UniqueTextBoxEx. The LoadPostData method of the UniqueTextBox is never getting called. What do I have to do to have child controls process their own postdata?
0
951
by: Lucas Tam | last post by:
Hi all, I'm implementing the IPostBackDataHandler interface, and have got it to work somewhat. However, I can't seem to capture any values for Linkbuttons. Do linkbuttons submit any type of value? Is there any way to capture which linkbutton was pushed in the LoadPostData method? Thanks.
1
1735
by: Sam | last post by:
According to "Developing Microsoft ASP.NET Server Controls and Components", a control can get the LoadPostData event by using RegisterRequiresPostBack, even if its UniqueID does not match that of the Forms collection. In the code below, I've tried doing this on a Page instead of a regular control. However, it doesn't work. The LoadPostData is never fired, even on postback. Does anyone have any idea why? How could I make it work for...
4
1658
by: Nathan Sokalski | last post by:
During my postbacks, I try to assign the value from an Input tag to a property of a custom control. However, I keep recieving the following error: An exception of type 'System.OverflowException' occurred in Microsoft.VisualBasic.dll but was not handled in user code Additional information: Arithmetic operation resulted in an overflow. The code that it highlights during this error is the 2nd line of the
0
1274
by: mankuipeng | last post by:
I am doing ActiveReports with .NET environment. There is a ASP.NET page, with custom control on it. Control displays data from database, by editing all the necessary data and click 'Submit' button to render ActiveReport. When I click 'Submit' button. LoadPostData and RaisePostBackEvent in custom control occurs, then Page_Load, then Render. It should stop at this point but sometimes LoadPostData and RaisePostBackEvent fire many times...
0
1199
by: tksc234 | last post by:
Hello there. My question is related to full custom server controls. 1) The 'input' element that caused the postback already has 'Me.UniqueID' in its name field. I assumed, the value of postDataKey is this UniqueID is that right? 2) How do you set (and retain) the values of the different properties across postback. For example i have some String properties (eg. SelectedItemNo, ImageUrl...), integers that i want to save according to which...
0
918
by: Nathan Sokalski | last post by:
I have a custom control that inherits CompositeControl implements IPostBackDataHandler and ICallbackEventHandler. In the LoadPostData function, I attempt to use the PostCollection parameter to get the data posted by the child controls created in CreateChildControls. In the PreRender event, I add onchange attributes to the DropDownLists with a value created using the Page.ClientScript.GetCallbackEventReference. When one of my DropDownLists...
0
1014
by: Nathan Sokalski | last post by:
I have a custom control that inherits CompositeControl implements IPostBackDataHandler and ICallbackEventHandler. In the LoadPostData function, I attempt to use the postCollection parameter to get the data posted by the child controls created in CreateChildControls. In the PreRender event, I add onchange attributes to the DropDownLists with a value created using the Page.ClientScript.GetCallbackEventReference. When one of my DropDownLists...
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.