Skip to content
Advertisement

Can’t update iframe’s src in the viewer in ASP.NET

In shared folder of ASP.NET C#, I create a .cshtml which defines a button that can GET data from an API. I would like to generate an url and use it to update an iframe of a viewer.

JavaScript

However, the iframe in the viewer, which named SearchingMap.cshtml, doesn’t updated.

JavaScript

Why can’t it work? How can I update the iframe of a viewer?

Advertisement

Answer

Here the iframe did not have the id SearchingMap so all javascript code fails because of this line:

JavaScript

Just add this id, on your iframe

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement