Re: Simulate button click to trigger postback

Brady Kelly <[email protected]> Fri, 25 Jan 2008 10:52:23 +0200
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <[email protected]>
It turned out I was refreshing, on the client click, before the server click
saved the record and closed the detail screen.  A simple refresh of the
frame's src to the same src with a timestamp was the simplest.

How would I call the onclick of btnRefresh from outside the frame that
contains btnRefresh's form?

>
> You should inspect what javascript is called at the onclick of the
> btnRefresh.
> Then call that code in your refreshMainForm
>
> It will have more or less the form like
> WebForm_DoPostBackWithOptions(new
> WebForm_PostBackOptions("ctl00$btnRefresh", "", true, "", "", false,
> false));
>
> or just call the onclick of the btnRefresh, which is probably better
> for code maintenance.
>
> // Ryan

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com