![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Oct 2004
Posts: 37
Rep Power: 0
![]() |
Hello:
From a web form I want open a new web form which I send one parameter from first web form, I’m using this code: if(this.CheckBox1.Checked == true) { string sIdPersona = ""; sIdPersona = TextBox3.Text; Response.Redirect("WebForm2.aspx?id_persona=" + sIdPersona); } If in first web form I use: Target = “_blank” in form of HTML Then if CheckBox1 is checked, it’s showing me 2nd web form correctly in a new window, but if CheckBox1 is not checked it’s showing me again 1st window into a new window. If in first web form I omit target = “_blank” Then if CheckBox1 is checked, it’s showing me 2nd web form into same window, where 1st window was, such thing I don’t want; but if it is not checked then nothing happens, this is OK. I wish attain new web form show in a 2nd window if CheckBox1 is checked and otherwise 1st web form stay there, do not opening again it in a 2nd window. I’ll thank you in advance if you’ll be able to help me to attain it. A.L.
__________________
<span style='color:red'>El Hombre que tiene Amigos, debe mostrarse Amigo...</span> |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Oct 2004
Posts: 37
Rep Power: 0
![]() |
Hello:
At last I found a way to solve it: I omit target = “_blank” of form in HTML. And I modified code thus: if(this.CheckBox1.Checked == true) { sIdPersona = TextBox3.Text; Response.Write("<script>"); Response.Write("window.open('WebForm2.aspx?id_persona=" + sIdPersona + "','_blank')"); Response.Write("</script>"); } I hope this solution work fine for other peoples with similar trouble. A.L.
__________________
<span style='color:red'>El Hombre que tiene Amigos, debe mostrarse Amigo...</span> |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|