473,789 Members | 2,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

UpdatePanels, LinkButtons, and PostBackUrls

I have an UpdatePanel that contains a LinkButton with a PostBackUrl. The
LinkButton is marked as a PostBackTrigger , so it does a full postback.
However, when it posts back, it goes straight to the page specified in the
PostBackUrl. I always thought (and the way I have always used it in the
past, where it worked) that it posted back to the page the button is on,
executed the stuff like Page_Load and the eventhandler for the button's
Click event, created the PreviousPage property, and then went to the page
specified in PostBackUrl. When using PostBackUrl, is it supposed to execute
the current page before going to the one specified in the PostBackUrl
property? Thanks.

Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Sep 11 '08 #1
2 1657
Hi Nathan,

You might be confusing the PostBackUrl functionality with the
Server.Transfer or Response.Redire ct call. The PostBackUrl functionality
actually sets the action property of the form to the specified URL, so the
browser makes the post request towards it.

To have some of the source page life cycle steps executed first, you can use
a normal postback and then either use Response.Redire ct, or Server.Transfer .
You could prefer Server.Transfer if you need to access the post data from
the target page.

Cheers,
Erjan

"Nathan Sokalski" <ns*******@kyle davidgroup.comw rote in message
news:un******** *****@TK2MSFTNG P06.phx.gbl...
>I have an UpdatePanel that contains a LinkButton with a PostBackUrl. The
LinkButton is marked as a PostBackTrigger , so it does a full postback.
However, when it posts back, it goes straight to the page specified in the
PostBackUrl. I always thought (and the way I have always used it in the
past, where it worked) that it posted back to the page the button is on,
executed the stuff like Page_Load and the eventhandler for the button's
Click event, created the PreviousPage property, and then went to the page
specified in PostBackUrl. When using PostBackUrl, is it supposed to execute
the current page before going to the one specified in the PostBackUrl
property? Thanks.

Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Sep 11 '08 #2
That is probably true, but something I found on the web after making my
original post was that the events from the source page I mentioned
(Page_Load, Click, etc.) are executed only if the PreviousPage property is
accessed on the target page. The author of the page I got was not sure why
this was the situation, but when I added a statement to my target page that
used the PreviousPage property, these events were executed, so I guess it
does work this way. I'm sure there is a little more detail to it somewhere,
but for now, this lets me do what I want.

Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Erjan Gavalji" <er******@yahoo .comwrote in message
news:Op******** ******@TK2MSFTN GP05.phx.gbl...
Hi Nathan,

You might be confusing the PostBackUrl functionality with the
Server.Transfer or Response.Redire ct call. The PostBackUrl functionality
actually sets the action property of the form to the specified URL, so the
browser makes the post request towards it.

To have some of the source page life cycle steps executed first, you can
use a normal postback and then either use Response.Redire ct, or
Server.Transfer . You could prefer Server.Transfer if you need to access
the post data from the target page.

Cheers,
Erjan

"Nathan Sokalski" <ns*******@kyle davidgroup.comw rote in message
news:un******** *****@TK2MSFTNG P06.phx.gbl...
>>I have an UpdatePanel that contains a LinkButton with a PostBackUrl. The
LinkButton is marked as a PostBackTrigger , so it does a full postback.
However, when it posts back, it goes straight to the page specified in the
PostBackUrl . I always thought (and the way I have always used it in the
past, where it worked) that it posted back to the page the button is on,
executed the stuff like Page_Load and the eventhandler for the button's
Click event, created the PreviousPage property, and then went to the page
specified in PostBackUrl. When using PostBackUrl, is it supposed to
execute the current page before going to the one specified in the
PostBackUrl property? Thanks.

Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

Sep 11 '08 #3

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

Similar topics

6
1439
by: Andrew Robinson | last post by:
I have a page that contains a number of link buttons that are used for making selections. I load my LinkButtons during the Page_PreInit event and they render fine but then I need to make a change to one of these LinkButtons depending on the selection. I am using the Command Event and passing a key in the Command.Name field. From within this even handler, I am clearing my LinkButtons and then re-redering and marking with a different...
1
3529
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all javascript, nothing really having to do with ASP.NET... I'm attempting to put together an application that consists of several GridView controls each bound to some xml data. Each table exists in its own update panel. The two effects I'm going for are:
0
1009
by: =?Utf-8?B?QWxleA==?= | last post by:
I have 3 Update Panels on my page. On Page load, UpdatePanels 2 and 3 are hidden. When I click a button in UpdatePanel1, I display the other two UpdatePanels and their contents. UpdatePanel 2 has an server-side button that when clicked, it needs to reference controls in UpdatePanel3 and perform some functions on the server. Since UpdatePanel2 and 3 weren't included in the original page, clicking the button in UpdatePanel 2 doesn't do...
2
1435
by: JC | last post by:
I have a form with a few UpdatePanels and each has an associated UpdatePanelAnimationExtender which causes fade-in and fade-out. In addition 2 of the animations disable the 2 buttons which trigger them in the Updating event and then enable them again in the Updated event. I was surprised to see that all the animations occur when any AJAX postback occurs. All the UpdatePanelAnimationExtenders have their UpdatePanel ID as their...
2
1902
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. I have an aspx page containing 2 AJAX UpdatePanels. Both panels contain requiredfieldvalidators & each have a validationsummary control. Both panels contain a button control that when clicked cause the validation to occur. Currently if I'm clicking the button in UpdatePanel1 to validate the requiredfieldvalidators in UpdatePanel1, UpdatePanel2 requiredfieldvalidators also validate. This will also cause the errormessages from...
1
1447
by: Nightcrawler | last post by:
I have a parent updatepanel with a repeater in it that generates 10 child updatepanels. I have one button that will refresh all these 10 updatepanels. On the button click I go through the repeateritems, pull some values from a few literals, pass the values to the webservice and then refresh that update panel for that repeater item. This means panel 1 is the first one to refresh before I move on to panel 2 and so forth. This currently...
1
4062
by: jack | last post by:
Hi folks, I got a custom control, in which it's placed inside the UpdatePanel. The control contains some LinkButtons which post back to the same page. Actually, when these LinkButtons are clicked, the entire page is refreshed which is not the desired effect. I only need the UpdatePanel to be refreshed. So, I decided to search the net to solve the issue. I just found that when the LinkButtons are registered for the PostBacks, the...
0
943
by: Mike Gleason jr Couturier | last post by:
Hi everyone, I have a page with multiple UpdatePanels (UpdateMode Conditional). I'm having a concurrency issue: 1- The user triggers an Update on a panel to change some business data. 2- The panel is changing the business layer (in session) 3- The business layer is triggering (Invoke) a delegate to notify every listeners that some business data have changed 4- Another update panel that was listening to the delegate in #3 is updating
7
2251
by: =?Utf-8?B?TWFyYw==?= | last post by:
Dear all I have a scenario where I have 2 updatepanels on a page, each one containing a weppartzone. the scriptmanager is outside of the updatepanels. when I go to design display mode, i can drag and drop just once between the wepartzones - then the solution breaks. If the scriptmanager is inside a weppartzone everything works fine. I found some old post that mentioned this problem. Is this issue resolved in
8
12952
by: Hamayun Khan | last post by:
Hi I have created linkbuttons dynamically using the below code Sub createlinkbutton(ByVal commandtext As String, ByVal Cmdarg As String, ByVal pane As Panel, ByVal count As Int32) Dim i = 0 Dim panel1 As Panel = New Panel
0
9665
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
9511
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
10408
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...
1
10139
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
9020
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...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6768
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.