473,503 Members | 11,783 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

doPostBack client-side function

Whenever you drop a linkbutton on an ASP.NET web form,
the following script gets emitted:

function __doPostBack(eventTarget, eventArgument) {
var theform = document.Form1;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value =
eventArgument;
theform.submit();
}

However, when I check the call to __doPostBack() executed
when the linkbutton is checked, only the eventTarget
argument is specified, even though the linkbutton has
it's CommandArgument property set.

What's the purpose of the .__EVENTARGUMENT field in
relation to server-side postback controls?

TIA

John
Nov 17 '05 #1
3 33365
__doPostBack is the generic asp.net generated function to cause postbacks.
Perhaps other controls that use it do have a reason to use the
__eventargument field.

"Johno" <lt********@hotmail.com> wrote in message
news:00****************************@phx.gbl...
Whenever you drop a linkbutton on an ASP.NET web form,
the following script gets emitted:

function __doPostBack(eventTarget, eventArgument) {
var theform = document.Form1;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value =
eventArgument;
theform.submit();
}

However, when I check the call to __doPostBack() executed
when the linkbutton is checked, only the eventTarget
argument is specified, even though the linkbutton has
it's CommandArgument property set.

What's the purpose of the .__EVENTARGUMENT field in
relation to server-side postback controls?

TIA

John

Nov 17 '05 #2
For example controls that implement IPostBackEventHandler interface can send
arguments for postback processing. Some action might vary based on which
argument has been sent for the particular control. For example
implementation of Next/Prev buttons in a custom control.

--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com
"Johno" <lt********@hotmail.com> wrote in message
news:00****************************@phx.gbl...
Whenever you drop a linkbutton on an ASP.NET web form,
the following script gets emitted:

function __doPostBack(eventTarget, eventArgument) {
var theform = document.Form1;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value =
eventArgument;
theform.submit();
}

However, when I check the call to __doPostBack() executed
when the linkbutton is checked, only the eventTarget
argument is specified, even though the linkbutton has
it's CommandArgument property set.

What's the purpose of the .__EVENTARGUMENT field in
relation to server-side postback controls?

TIA

John

Nov 17 '05 #3
Thanks for the response guys

John
Nov 17 '05 #4

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

Similar topics

0
1695
by: valmir cinquini | last post by:
Hi, I've noticed that a doPostBack call always cause the position of the page goes up to the top of the page, after round trip. I'd like to place the page at original position where it was...
1
1490
by: George | last post by:
I have problems with anything that uses doPostBack. I am running .NET Framework 1.0.3705.288. Any advice would be greatly appreciated.
0
1067
by: jm | last post by:
In my form, datagrid, etc., I have it so when the user enters certain criteria and click the button, the appropriate records return. If the user enters no criteria, all the records return (in a...
3
1419
by: tfs | last post by:
I am working on sorting a datagrid and it works fine on my site. The exact same page on my customer sites gives me an page cannot be displayed (invalid syntax error - in window bar). The Url...
3
4101
by: Mad Scientist Jr | last post by:
I have some javascript I would like to run after a doPostBack occurs: onchange="javascript:__doPostBack('Text1','');" The doPostBack is being added dynamically by .NET when it renders the...
4
4200
by: Zuel | last post by:
Hi Folks. So I have a small problem. My DoPostBack function is not writen to the HTML page nor are the asp:buttons calling the DoPostBack. My Goal is to create a totaly dynamic web page where...
2
5525
by: DSipp | last post by:
First, I am not a developer. My company works with a partner. This partner has a web app that we interact with. All of my systems can connect and login to this site. When we select an issue link,...
6
14432
by: Mark Olbert | last post by:
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an autopostback checkbox, for that matter). I'm aware of a problem with Netscape browsers and the...
2
7557
by: J Huntley Palmer | last post by:
I am having a horrific time integrating uw-imap's c-client for imap support in php. The problem is a whole bunch of "Text relocation remains referenced against symbol" errors during linking....
4
9664
by: Marko Vuksanovic | last post by:
I am trying to cause the uplaod button, id="Upload",when clicked, to exectue the onClick event for Button1, id="Button1". <asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload>...
0
7070
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...
1
6976
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
7449
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
5566
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,...
1
4993
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...
0
4666
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...
0
1495
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 ...
1
729
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
372
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...

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.