form refreshing!!!!!!

V

Vadivel Kumar

Hi,

I have a form (parent window), in that i have one usercontrol
(which is having one text box and a button), once
the user clicked the usercontrol's button a
child window will be opened and he is doing some thing
with the child window.

Now, when ever i click the usercontrol's button the page
get refreshed while opening a child window.

I want to stop that, becuase the other values
in the form is cleared b'coz of that.

can you give me some hint?

cheers
Vadivel Kumar
 
J

Jason Bentley

Vadivel, have you disabled viewstate on the parent form? When you click
a button, you are causing a postback event, which is okay but the
client form could easily be opened with client script using
Button1.Attributes.Add("onclick", window.open('childform.aspx');");

Jason Bentley
http://geekswithblogs.net/jbentley
 
V

Vadivel Kumar

Same thing i'm doing. But switching off
the viewstate is not works out.

Vadivel Kumar
 
B

Brock Allen

Change your button from a <asp:Button> to a <input type=button>. You can
still make it a server side control if you need to programmatically work
with it on the server, but now when it's clicked it won't postback.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top