473,587 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

__doPostBack() not generated

I checked the rendered html and found __doPostBack() function was not found
in the html source. Is there a reason? How do I force it to be generated.
The page seems to function properly for post back but I DO need the
__doPostBack() function to post back by a child popup window.

Mar 14 '06 #1
3 2687
Hey steve,

The framework will only add that section of code for controls that need to
postback such as Asp:buttons, linkbuttons, dropdownlists that have
autopostback=tr ue, etc.

You can add that bit of code to your page by using the Page's
GetPostBackClie ntHyperlink. That allows post back processing of your control
on the server.

Page.GetPostBac kClientHyperlin k(Control,"");

HTH,
Tony
"Steve Wonderful" <St************ @discussions.mi crosoft.com> wrote in
message news:F1******** *************** ***********@mic rosoft.com...
I checked the rendered html and found __doPostBack() function was not found
in the html source. Is there a reason? How do I force it to be
generated.
The page seems to function properly for post back but I DO need the
__doPostBack() function to post back by a child popup window.

Mar 15 '06 #2
hi,
From a child you can call .. window.opener.f orms[0].submit();

or
window.opener.f orms[0].myFunction();

in parent page

<JS>
function myfunction()
{
__doPostBack();
}
<JS>
"Steve Wonderful" <St************ @discussions.mi crosoft.com> wrote in
message news:F1******** *************** ***********@mic rosoft.com...
I checked the rendered html and found __doPostBack() function was not found
in the html source. Is there a reason? How do I force it to be
generated.
The page seems to function properly for post back but I DO need the
__doPostBack() function to post back by a child popup window.

Mar 16 '06 #3
__doPostBack only generated if you have controls like LinkButton.
You can dump it on a form and surround it with <!-- your link button
here -->
So people will not see it.

George
"Munawar Hussain" <mu*******@msn. com> wrote in message
news:OT******** ******@TK2MSFTN GP11.phx.gbl...
hi,
From a child you can call .. window.opener.f orms[0].submit();

or
window.opener.f orms[0].myFunction();

in parent page

<JS>
function myfunction()
{
__doPostBack();
}
<JS>
"Steve Wonderful" <St************ @discussions.mi crosoft.com> wrote in
message news:F1******** *************** ***********@mic rosoft.com...
I checked the rendered html and found __doPostBack() function was not
found
in the html source. Is there a reason? How do I force it to be
generated.
The page seems to function properly for post back but I DO need the
__doPostBack() function to post back by a child popup window.


Mar 16 '06 #4

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

Similar topics

1
1754
by: Randy | last post by:
Does anyone know of a situation where the "__doPostBack" function would not be auto-generated for your ASPX page? (ie. when the ASPX page is rendered in IE and you do a View Source, the __doPostBack() function was not auto- generated) I have one site that is like this -- looks to be site- wide -- and can't determine why it is doing this?
1
6800
by: paul reed | last post by:
Hello, I am having some weird behavior between two machines...one which is running the 1.1 framework and one which is running 1.0. After opening a child form from a parent...I update the database then call the __doPostBack function of the window.opener. This has been working like a charm for the last several months. Our ISP where we run...
3
10865
by: E | last post by:
I have 2 aspx pages... neither of which do anything out of the ordinary. One of the pages automatically generates this block of code when viewed at the client: ------------------------------------------------------------ <form name="webfrmForm" method="post" action="pokedex.aspx" id="webfrmForm"> <input type="hidden" name="__EVENTTARGET"...
3
1221
by: rezas | last post by:
Anybody has come acros this before One of my pages, stop generating the __doPostBack at runtime? It was working before, but VS locked up. Has to kill it and restart it and now it has this problem? Any help would be greately apreciated - stuck and can't do much till I resolve this - I even ran the maintainace install, with no changes!
0
1557
by: AJP | last post by:
I have a child window which does the following after a button is pressed: Response.Write("<script>window.opener.__doPostBack('','');</script>"); but I get the following uncaught exception upon doing this: "An error has occurred because a control with auto-generated id '_ctl139' could not be located to raise a postback event. To avoid...
0
1784
by: AJP | last post by:
I have a child window which does the following after a button is pressed: Response.Write("<script>window.opener.__doPostBack('','');</script>"); but I get the following uncaught exception upon doing this: "An error has occurred because a control with auto-generated id '_ctl139' could not be located to raise a postback event. To avoid...
6
3306
by: GaryDean | last post by:
below is the html of two dropdownlists as they are rendered. The first was created with Postback = false and I added the onchange="myFunction('DropDownList1,'') in code. I made this look very much like the asp generated onchange attribute in the second dropdown where postback was set as true. In the standard DropDownList2 the second...
1
3075
by: Philip | last post by:
I am attempting to use the ASP.NET generated __doPostBack JavaScript function in my custom JavaScript and I can use it successfully but only after the web page is loaded and idle. I prefer to invoke __doPostBack immediately after web page load. I have been attempting to use the HTML Body OnLoad event to trigger invoking __doPostBack...
0
1658
by: =?Utf-8?B?Uml0YUc=?= | last post by:
Hello. I'm maintaining a C# Web based project that has a class which adds a "Show All" / "Show By Page" functionality to a datagrid that allows paginating. This class works when there are controls on the form that do a postback but does not work when there are none. When there is a postback control I can see the __doPostback function in the...
0
7849
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...
1
7973
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...
0
8220
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...
1
5718
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...
0
5394
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...
0
3844
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...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
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...

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.