hey all,
does server-side page_load what button was pressed on a postback?
thanks,
rodchar 7 1074
rodchar wrote:
hey all,
does server-side page_load what button was pressed on a postback?
thanks,
rodchar
Not directly no. But its simple enough to set a Session variable so that
it will know.
How would that help the OP though - Page_Load event fires before OnClick
event (which I would guess is where you would set the session value).
"Mick Walker" <ma**********@p rivacy.netwrote in message
news:5o******** ****@mid.indivi dual.net...
rodchar wrote:
>hey all, does server-side page_load what button was pressed on a postback?
thanks, rodchar
Not directly no. But its simple enough to set a Session variable so that
it will know.
"rodchar" <ro*****@discus sions.microsoft .comwrote in message
news:AD******** *************** ***********@mic rosoft.com...
does server-side page_load [know] what button was pressed on a postback?
Yes - Request.Form["__EVENTTAR GET"]
However, it has no need to know this...
--
Mark Rae
ASP.NET MVP http://www.markrae.net
Here's the reason i ask:
i have an UpdatePanel that contains a div which contains my web user control
called CalendarHelper. ascx. The user control consists of a textbox, calendar
image button, and calendar to help with date entry. I can load this user
control dynamically but whenever i click the calendar icon to make the
calendar appear the webcontrol just disappears on postback/async callback.
This is the only code i have and thought i would need:
protected void BtnEdit_Click(o bject sender, EventArgs e)
{
CalendarHelper cal1 = new CalendarHelper( );
cal1 = (CalendarHelper )cal1.LoadContr ol("CalendarHel per.ascx");
divmain.Control s.Add(cal1);
}
p.s. i know there is an easier way to do this but i have to work with the
user control that i've been given.
"Mark Rae [MVP]" wrote:
"rodchar" <ro*****@discus sions.microsoft .comwrote in message
news:AD******** *************** ***********@mic rosoft.com...
does server-side page_load [know] what button was pressed on a postback?
Yes - Request.Form["__EVENTTAR GET"]
However, it has no need to know this...
--
Mark Rae
ASP.NET MVP http://www.markrae.net
"rodchar" <ro*****@discus sions.microsoft .comwrote in message
news:9D******** *************** ***********@mic rosoft.com...
i have an UpdatePanel that contains a div which contains my web user
control
called CalendarHelper. ascx. The user control consists of a textbox,
calendar
image button, and calendar to help with date entry. I can load this user
control dynamically but whenever i click the calendar icon to make the
calendar appear the webcontrol just disappears on postback/async callback.
What code is behind the calendar icon?
--
Mark Rae
ASP.NET MVP http://www.markrae.net
all that does is toggle the calendar control's visibility.
"Mark Rae [MVP]" wrote:
"rodchar" <ro*****@discus sions.microsoft .comwrote in message
news:9D******** *************** ***********@mic rosoft.com...
i have an UpdatePanel that contains a div which contains my web user
control
called CalendarHelper. ascx. The user control consists of a textbox,
calendar
image button, and calendar to help with date entry. I can load this user
control dynamically but whenever i click the calendar icon to make the
calendar appear the webcontrol just disappears on postback/async callback.
What code is behind the calendar icon?
--
Mark Rae
ASP.NET MVP http://www.markrae.net
"rodchar" <ro*****@discus sions.microsoft .comwrote in message
news:9D******** *************** ***********@mic rosoft.com...
Here's the reason i ask:
i have an UpdatePanel that contains a div which contains my web user
control
called CalendarHelper. ascx. The user control consists of a textbox,
calendar
image button, and calendar to help with date entry. I can load this user
control dynamically but whenever i click the calendar icon to make the
calendar appear the webcontrol just disappears on postback/async callback.
This is the only code i have and thought i would need:
protected void BtnEdit_Click(o bject sender, EventArgs e)
{
CalendarHelper cal1 = new CalendarHelper( );
cal1 = (CalendarHelper )cal1.LoadContr ol("CalendarHel per.ascx");
divmain.Control s.Add(cal1);
}
p.s. i know there is an easier way to do this but i have to work with the
user control that i've been given.
"Mark Rae [MVP]" wrote:
>"rodchar" <ro*****@discus sions.microsoft .comwrote in message news:AD******* *************** ************@mi crosoft.com...
does server-side page_load [know] what button was pressed on a
postback?
Yes - Request.Form["__EVENTTAR GET"]
However, it has no need to know this...
-- Mark Rae ASP.NET MVP http://www.markrae.net
You need to reload the ascx in the page init event.
LS This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ross |
last post by:
I have an aspx page containing two IFrames, each of which
contain aspx pages. The mother page has a dataset filled
with a single call to my Oracle database. This dataset has
three tables. The mother page uses data from table1; the
first child page uses data from table2 and table3; the
last child page uses table3 only.
So the mother page's Page_Load fills the dataset and binds
to some controls. The child pages will use their Page_Load...
|
by: Erick |
last post by:
Hi,
Is there any way that I can know the object that does
fires or does postback to the page on the Page_Load event.
I tried to use the sender object that is defined as
parameter into this event.
Thanks for any help provied.
|
by: Jeronimo Bertran |
last post by:
Hi,
I have a page with a very data intensive grid which needs to be
automatically refreshed constantly if a change is detected. In order to
not refresh the complete page so often, I created an iframe on my page
whose html has the refresh meta as follows :
<meta http-equiv="refresh" content="10">
The iframe is effectivelyh refreshed every 10 seconds without having the
|
by: bminder |
last post by:
In the asp.net pages below, Common.vb has an overridable Page_Load sub. In
the consuming page, Two.aspx, the Page_Load sub is inherited, but for some
reason it (Overrides Sub Page_Load) executes twice.
In another "regular" asp.net page that inherits only from its own codebehind
page, the page load only executes once as you'd expect.
Any ideas why the page_load fires twice in the former example?
Thanks,
|
by: V. Jenks |
last post by:
I'm a little rusty having not touched .NET for 6 months and
I can't remember why Page_Load is happening twice in this code:
private void Page_Load(object sender, System.EventArgs e)
{
//existing session?
if (Session == null)
{
//save local empty order object
this._newOrder = Orders.Initialize();
| |
by: Nathan Sokalski |
last post by:
What is the difference between the Page_Init and Page_Load events? When I
was debugging my code, they both seemed to get triggered on every postback.
I am assuming that there is some difference, and I would like to know what
it is so that I can take advantage of it in my code. Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
|
by: rockdale |
last post by:
Hi,
I have a masterpage and on the page_load event I Populate my mainmenu
from database.
I the page_load event of my content, I am trying to programmly select
the menuitem that represent current content page, but as you know, the
page_load event is fired backward, the content page_load fires first
then followed by the master page page_load, I could not get the
mainmenu in the content page( have not been initialized since
|
by: oaksong |
last post by:
Looking at the locals I have "ME" and "sender". I've just clicked on a
dropdownlist and it's fired a post back. I'm in the page_load. I know
that after the page_load is complete it will fire the click event
handler for my dropdownlist, which indicates, since I've got several
of these, that it knows which one fired.
The question is: How does it know? Is there something in "Me" or
"sender" that tells it what I clicked on? This seems to me...
|
by: =?Utf-8?B?bXBhaW5l?= |
last post by:
Hello,
I am completely lost as to why I can't update a DropDownList inside a
DetailsView after I perform an insert into an object datasource. I tried to
simply it down to the core demostration:
default.aspx:
|
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...
|
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...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |