problem after using window.open from asp.net

sara23apr
02-14-2007, 03:40 AM
Hello Friends

onClick of a button i need to open a new page.
i am using the following code to do it

Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim url As String = "Payments.aspx"
Response.Write("<script language=javascript>window.open('" & url & "','new_Win');</script>")
End Sub

works beautifully...except that after the new page opens , textboxes in the calling page reduce their height by half!!! ....just dont know how to solve this
i am using css to define height, even giving inline height did not solve the challenge

Can anyone help???


regards
Sara

wayneph
02-14-2007, 06:57 AM
Don't PostBack. Instead of using an <asp:button> for the one that opens the new windows, just use a standard old HTML <input type="button" /> control.

Then the main page won't change at all.

sara23apr
02-15-2007, 05:12 PM
Thanks wayneph for your reply
Currently
i have changed the code from using response.write to use "ClientScript.RegisterStartupScript"

Now it work fine

I will try out wht you have suggested. Thanks

regards
Sara

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum