| |

VerySource

 Forgot password?
 Register
Search
View: 905|Reply: 8

Ask a button event

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-17 18:30:01
| Show all posts |Read mode
I want to find a new window after I click the button, I don't know how to write, please ask ~

protected void btnContrast_Click (object sender, EventArgs e)
{
}
Reply

Use magic Report

1

Threads

18

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-4-20 21:45:02
| Show all posts
response.write ("<script language = javascript> window.open ('page') </ script>")
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-4-21 12:30:01
| Show all posts
In this case, the original page will be refreshed
Reply

Use magic Report

0

Threads

41

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-4-26 16:15:01
| Show all posts
string s = String.Format ("<script> window.open (\" ../ UserControls / FileSubmit.aspx\", '', 'toolbar = no, menubar = no, titlebar = yes, directories = no, resizable = yes , status = yes, fullscreen = no, top = 200, left = 200, width = 600, height = 320 '); </ script> "));
Response.Write (s);
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-28 21:00:01
| Show all posts
response.write ("<script language = javascript> window.open ('URL', 'Page name', = no, menubar = no, titlebar = yes, directories = no, resizable = yes, status = yes, fullscreen = no , top = 200, left = 200, width = 600, height = 320 ') </ script> ")
Reply

Use magic Report

0

Threads

17

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-4-29 11:30:02
| Show all posts
protected void btnContrast_Click (object sender, EventArgs e)
{
}
If you write here again, it will definitely refresh. .
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-4-29 16:30:01
| Show all posts
en Because the button on the server is represented in the form of submit on the client
The form must be submitted.
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-4-30 13:30:02
| Show all posts
asp: Button tag is parsed as <input type = "submit" ...> Html tag,
Reply

Use magic Report

0

Threads

7

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-5-4 21:15:01
| Show all posts
you can choose
this.button1.attribute ["onclick"] = "JavaScript: window.open ('daa.aspx'); return false" certainly not refresh
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