如何动态地将变量值从数据库传递到iframe src [英] how to pass a variable value into iframe src from database dynamically

查看:237
本文介绍了如何动态地将变量值从数据库传递到iframe src的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在c#asp.net的网页上工作,iframe应该从下拉列表中获取src,我从数据库中列出了youtube网址。

检索它的价值很好但是我是无法将值(即url)动态发布到iframe src中

I am working on webpage in c# asp.net where the iframe should get the src from the dropdown list where i listed the youtube url's from database.
upto retrieving the value itis fine but i am not able to post the value i.e the url into the iframe src dynamically

推荐答案

我建​​议在下拉列表选择更改事件中动态添加iframe。这样您就可以更好地控制流量。否则,如果你想避免往返..为什么不使用查询字符串发送网址?你需要弄清楚处理特殊字符的逻辑。



希望我的回答可能会显示出来。



问候,

Pavan N
I Suggest to dynamically add the iframe on dropdown selection change event. So that you will have a better control over theflow. Else if you want to avoid a round trips.. Why dont you send the url using query string? you need to figure out the logic to handle the special characters also.

Hope my answered might show a light.

Regards,
Pavan N


这篇关于如何动态地将变量值从数据库传递到iframe src的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆