| |

VerySource

 Forgot password?
 Register
Search
View: 895|Reply: 5

How to call functions in another framework from ASP.NET? anxious!

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-13 13:40:01
| Show all posts |Read mode
There are two left and right frames in the page. There is a tree list in the left frame, some controls on the right, and a DataGrid. I want the function in the right frame to be executed in the tree list OnSelectedChanged on the left to modify the DATAGRID data, instead of refreshing the entire right page
    Since it is runat = server instead of client, using document.Frames ["mail"] can only call the client, there is nothing to do, ask for help! !! !! !! anxious! !! !! Many thanks! !! !! !!
Reply

Use magic Report

0

Threads

73

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-16 18:36:01
| Show all posts
Just want to execute a function in b.ASPX on the right in a.ASPX on the left? Then this function should have public property
Then create an instance of b.aspx in a.ASPX and call it directly
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 France

Post time: 2020-1-16 19:45:02
| Show all posts
Just want to execute a function in b.ASPX on the right in a.ASPX on the left? Then this function should have public property
Then create an instance of b.aspx in a.ASPX and call it directly
==============
The code above works from the code point of view.

But this is just a method and property of the page on the right, but it is not an instance of the page on the right,
In other words, the operation does not have any effect on the right page.
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-1-16 20:09:01
| Show all posts
Can be operated on the client.

When Spanning Tree on the Left

Node.Text = "<span onclick = 'javascript: GoMyFunction ();'>" + Text + "</ span>"


function GoMyFunction ()
{
     window.parent.frames ["mail"]. document.all.btnUpdate.click (); // Click a button on the right page to trigger a server event.
}
Reply

Use magic Report

0

Threads

73

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 Japan

Post time: 2020-1-16 20:45:01
| Show all posts
shenmue024looks more carefully, huh, huh.
Did not see the main refresh on the right
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-6 18:45:01
| Show all posts
Not bad, I learned.
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