I tried javascript postback while using server button and it doesnt work. I
tried modalless window.open mechanism with server control again it doesnt
work. Can u gimme an example of how u do it ?
Thanks
Ashish
"James Culshaw" <Ja****@dumgal.gov.uk> wrote in message
news:0F**********************************@microsof t.com...
The problem is the serverside button. It automatically starts a postback
when you click it. You can change the value of the control on the
client-side via JavaScript and then submit the form and pick up the new
value on the server, its something I do all the time. If you show the form
modally ther is a problem that when the page that is the modal popup page is
submitted it actually submits the parent window rather than the current
window. This might also be causing the problem. To open the popup windiw try
using a standard html button rather than a webforms button. Also, try not
opening the new window modally and see if that helps.
James :-)
----- Ashish wrote: -----
Hi All,
I have a server runnable textbox control. I also have a server side
button object but I hook up javascript to it to show a modal dialog. Upon
return it places the value in the textbox (client side script). The problem is
that after it places the value, postback occurs and value is lost. I have
tried overriding SaveViewState and LoadViewState but it doesnt help (for
some super cool reason load is called first after postback rather than
save view state. however since the value of textbox is changed on client side
it doesnt help at all). Next I tried implementing IPostBackDataHandler
and IPostBackEventHandler events but the methods arent' called at all.
Help !!! I wanna prevent silly workouts of a hidden field if possible.
Thanks
Ashish