Not working the _dopostback when i call the function in body onload

Posted by Gg under ASP.NET on 6/10/2011 | Points: 10 | Views : 1942 | Status : [Member] | Replies : 2
Hi,

The below javascript its not working when i call the function in body onload.

Anybody please tell me what is wrong in this script?

<script language="javascript">
function PostBack()
{
__doPostBack('btn_Request',' '');
}
</script>
</head>
<body onload='PostBack();'>

Thanks,
GG.




Responses

Posted by: Robin_ahuja2008 on: 6/17/2011 [Member] Starter | Points: 25

Up
0
Down
That will work, just pass the correct ClientID of button , which is generated if you are using master page

Regards,
Robin Ahuja

Gg, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakn2 on: 6/17/2011 [Member] Starter | Points: 25

Up
0
Down
try this
<body onload="PostBack()">

or

<body onload="return PostBack()">

Thanks&Regards
LakshmiNarayana Nalluri.

Gg, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response