惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
G
Google Developers Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
L
LangChain Blog
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
小众软件
小众软件
WordPress大学
WordPress大学
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
美团技术团队
Jina AI
Jina AI
T
Tailwind CSS Blog
Google DeepMind News
Google DeepMind News
D
Docker

博客园 - 虚空境界

当WEB站点应用程序池标识为ApplicationPoolIdentity,出现运行错误时的解决方法 sql表设计器的几个默认值 easyui中tree型控件不正常显示的处理方法 Ajax.ActionLink与Ajax.BeginForm使用场所的思考 mvc中ajax.beginform一次提交重复Post两次的问题解决 JQuery EasyUI弹出对话框解决Asp.net服务器控件无法执行后台代码的方法(转) ASP.NET验证控件RegularExpressionValidator的常见表达式 后台动态设置前台标签内容和属性(转自http://www.wzsky.net/html/Program/net/26171.html) ASP.NET中使用 Response.Write("<script>alert('****');</script>");后CSS界面发生变化的解决方法 (经验证) silverlight控件如何自适应 “System.ServiceModel.DomainServices.Client.DomainOperationException:查询"XXX"load操作失败,远程服务器返回了错误:NoFound.……”解决方法 按规定长度显示指定绑定字段的内容 CKEditor3.6.1+CKFinder2.0.2结合 打造"帅"的编辑器 For .Net WEB.CONFIG资料收集 ckeeditor和ckfinder在asp.net中的使用 用户体验的网站首页设计的准则 开发播放器中所学/用到的知识 关于使用IDE制作样式表后不能正常显示的问题 域用户组策略禁用QQ等软件 域用户组策略设定IE主页
asp.net中使用ckfinder2选择图片并返回图片文件的路径的代码
虚空境界 · 2011-08-22 · via 博客园 - 虚空境界

在ASP.NET页面中加入以下代码:

<div>
<script type="text/javascript" src="../ckfinder/ckfinder.js"></script>
<script type="text/javascript">
    function BrowseServer(inputId) {
        var finder = new CKFinder();
        finder.basePath = '../ckfinder/'; //导入CKFinder的路径
        finder.selectActionFunction = SetFileField; //设置文件被选中时的函数
        finder.selectActionData = inputId; //接收地址的input ID
        finder.popup();
    }
    //文件选中时执行
    function SetFileField(fileUrl, data) {
        document.getElementById(data["selectActionData"]).value = fileUrl;
    }
</script>
<p>
<asp:TextBox ID="txtImgPath" runat="server" Height="17px" Width="429px"></asp:TextBox>
<input type="button" value=" 浏 览 " onclick="BrowseServer('<%=txtImgPath.ClientID %>');" />
</p>
</div>