| |

VerySource

 Forgot password?
 Register
Search
View: 1571|Reply: 12

How can I open it in another new page without refreshing the original page? The requirement is to write in a .cs file

[Copy link]

3

Threads

26

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-2-10 17:00:02
| Show all posts |Read mode
This write is opened on another new page, but the original page will refresh: Response.Write ("<script language = javascript> window.open ('zw.aspx? Name =" + searchTxt.Text + "&date =" + this .fbdate.Value + "&xz =" + gz + "'); </ script>");

How can I open it in another new page without refreshing the original page? The requirement is to write in a .cs file
Reply

Use magic Report

0

Threads

23

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-4-4 22:00:01
| Show all posts
"<a href =\" dzgg_infolist.aspx? id = "+ dr [" EDICTID "]. ToString () +"\"" +
"onclick =\" window.open (this.href, '', 'height = 400, width = 800, left = 150, top = 20, toolbar = no, menubar = no, "+
"scrollbars = no, resizable = no, location = no, status = no '); return false;\"> "+ dr [" EDICTTITLE "]. ToString () +" </a> "
Reply

Use magic Report

3

Threads

26

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

 Author| Post time: 2020-4-5 08:45:01
| Show all posts
Can it be done in a .cs file? Because I have to make some other judgments
Reply

Use magic Report

0

Threads

22

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-4-6 06:00:02
| Show all posts
to complete the .cs file? The page does not move, so how do you trigger it?
Reply

Use magic Report

0

Threads

26

Posts

20.00

Credits

Newbie

Rank: 1

Credits
20.00

 China

Post time: 2020-4-6 18:15:02
| Show all posts
Your judgment in CS can be judged in JS, so you can achieve no refresh
Reply

Use magic Report

3

Threads

26

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

 Author| Post time: 2020-4-6 23:45:01
| Show all posts
This is it
Reply

Use magic Report

0

Threads

23

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-4-10 10:15:01
| Show all posts
This code is in cs, not js
Reply

Use magic Report

0

Threads

23

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-4-10 13:45:01
| Show all posts
You can bind the code to a place to use
Reply

Use magic Report

0

Threads

15

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 Japan

Post time: 2020-4-10 22:15:01
| Show all posts
<script language = "JavaScript">
function GetResult ()
{
var test = new ActiveXObject ("Microsoft.XMLHTTP");
test.open ("POST", "abc.aspx", false);
test.send ();
if (test.responseText == "ok")
{
window.open
}
Reply

Use magic Report

0

Threads

15

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-4-11 15:45:01
| Show all posts
/// <summary>
/// Information prompt, do not refresh the pop-up dialog box, pass value: messagestring, this
/// </ summary>
/// <param name = "messagetext"> </ param>
/// <param name = "myc"> </ param>
public void message (string messagetext, System.Web.UI.Control myc)
{
Literal lbshow = new Literal ();
myc.Controls.Add (lbshow);
lbshow.Text = "<script language = 'javascript'> alert ('" + messagetext + "'); location.href = 'index.aspx'; </ script>";
}

try it.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list