iframe src assignment problem (server side)

iframe src assignment problem (server side)
I encountered this problem today. I reassigned the src value of the iframe on the server side, added an ID to the iframe, and added runat=server

1. Assign a value to the src of the iframe via JS

2. If you need to change the src of the iframe when the page is loaded in the C# background, you can do

For example, <iframe id="ifram" runat=server > is applied as a server-side control and written in the program

Copy code
The code is as follows:

ifram.Attributes.Add("src",strUrl);

strUrl is a string and can be assigned any value.

<<:  MySQL Router implements MySQL read-write separation

>>:  Detailed explanation of the spacing problem between img tags

Recommend

Introduction to who command examples in Linux

About who Displays users logged into the system. ...

Summary of knowledge points about covering index in MySQL

If an index contains (or covers) the values ​​of ...

VUE implements bottom suction button

This article example shares the specific code of ...

How to disable foreign key constraint checking in MySQL child tables

Prepare: Define a teacher table and a student tab...

Vue Page Stack Manager Details

Table of contents 2. Tried methods 2.1 keep-alive...

Summary of pitfalls encountered in installing mysql and mysqlclient on centos7

1. Add MySQL Yum repository MySQL official websit...

Use of MySQL truncate table statement

The Truncate table statement is used to delete/tr...

Five delay methods for MySQL time blind injection

Five delay methods for MySQL time blind injection...

How to set the border of a web page table

<br />Previously, we learned how to set cell...

JavaScript Document Object Model DOM

Table of contents 1. JavaScript can change all HT...

Three ways to avoid duplicate insertion of data in MySql

Preface In the case of primary key conflict or un...

Example code for implementing fullpage.js full-screen scrolling effect with CSS

When I was studying CSS recently, I found that I ...

Detailed examples of Zabbix remote command execution

Table of contents one. environment two. Precautio...

How to upgrade CentOS7 to CentOS8 (detailed steps)

This article uses a specific example to introduce...