Hot Ti 在运行时在 ASP.NET 表单中插入脚本
我将可视化保存在数据库、标题、描述等和代码字段中,在代码字段中我保存将生成可视化的“代码”,它可能就像托管在某处的图像的 URL 一样简单,或者类似于:
<script src="https://spreadsheets.google.com/gpub?url=http%3A%2F%2Foj0ijfii34kccq3ioto7mdspc7r2s7o9-ss-opensocial.googleusercontent.com%2Fgadgets%2Fifr%3Fup_title%3DBrands%26up_initialstate%26up__table_query_url%3Dhttps%253A%252F%252Fspreadsheets.google.com%252Fspreadsheet%252Ftq%253Frange%253DA%25253AE%2526key%253D0AqFjLMbUaBn_dFhwbV9DQ3N6cWN1SmFiUlF5X1RXUkE%2526gid%253D0%2526pub%253D1%26url%3Dhttp%253A%252F%252Fwww.google.com%252Fig%252Fmodules%252Fmotionchart.xml%26spreadsheets%3Dspreadsheets&height=448&width=710"></script>
我将其保存为数据库中的 nvarchar(max) ,现在我有一个页面应该显示我在运行时调用的可视化效果,那么最好的方法是什么?!例如一个div?又如何呢?
提前致谢
I am saving Visualizations in a database, title, description...etc and CODE field, in the Code field I save the "code" that will generate the visualization, it may be as simple as a URL for an image hosted somewhere, or something like:
<script src="https://spreadsheets.google.com/gpub?url=http%3A%2F%2Foj0ijfii34kccq3ioto7mdspc7r2s7o9-ss-opensocial.googleusercontent.com%2Fgadgets%2Fifr%3Fup_title%3DBrands%26up_initialstate%26up__table_query_url%3Dhttps%253A%252F%252Fspreadsheets.google.com%252Fspreadsheet%252Ftq%253Frange%253DA%25253AE%2526key%253D0AqFjLMbUaBn_dFhwbV9DQ3N6cWN1SmFiUlF5X1RXUkE%2526gid%253D0%2526pub%253D1%26url%3Dhttp%253A%252F%252Fwww.google.com%252Fig%252Fmodules%252Fmotionchart.xml%26spreadsheets%3Dspreadsheets&height=448&width=710"></script>
I am saving this as an nvarchar(max) in my database, now I have a page that should display the visualization I call on run time, so what is the best way to do so?! a div for example? and how?
Thanks in dvance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,开始吧 Maen ...
1) 声明您的 IFrame(您可以设置更多属性,例如高度和宽度):
2) 从存储在数据库中的“脚本”获取 URL
这有帮助吗?
ok, here you go Maen ...
1) Declare your IFrame (you can set more properties like height & width):
2) Get the URL from your "Script" stored in your Database
does this help?